Skip to content

Commit

Permalink
fix: redirect page
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Oct 27, 2023
1 parent 2f3e2d0 commit 7bc9f88
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ import { ValidationPipe } from './pipe/validation/validation.pipe';
serveRoot: '/',
rootPath: join(__dirname, '..', 'website/dist'),
}),
ServeStaticModule.forRoot({
serveRoot: '/redirect',
rootPath: join(__dirname, '..', 'website/dist'),
}),
// 托管检测报告的静态资源
ServeStaticModule.forRoot({
serveRoot: '/report',
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dingtalkRobot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ class DingtalkRobot {
// 任务超时告警
async timeout({ taskId, projectId, versionId, versionName }) {
const title = '任务超时告警';
const text = `taskId: ${taskId} 【运行超时】,请注意检查!\n\n版本名称:[${versionName}](http://yice.dtstack.cn?projectId=${projectId}&versionId=${versionId})`;
const text = `taskId: ${taskId} 【运行超时】,请注意检查!\n\n版本名称:[${versionName}](http://yice.dtstack.cn/redirect?projectId=${projectId}&versionId=${versionId})`;

await this.send(taskId, title, text);
}

// 任务运行失败告警
async failure({ taskId, projectId, versionId, versionName }) {
const title = '任务失败告警';
const text = `taskId: ${taskId} 【运行失败】,请注意检查!\n\n版本名称:[${versionName}](http://yice.dtstack.cn?projectId=${projectId}&versionId=${versionId})`;
const text = `taskId: ${taskId} 【运行失败】,请注意检查!\n\n版本名称:[${versionName}](http://yice.dtstack.cn/redirect?projectId=${projectId}&versionId=${versionId})`;

await this.send(taskId, title, text);
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/taskRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export const taskRun = async (task: ITask, successCallback, failCallback, comple
const { weight, acronym } = auditRef;
const { score, numericValue } = audits[auditRef.id] || {};
if (numericValue === undefined) {
console.log(`taskId: ${taskId}, 检测结果出现问题,没有单项检测时长`);
throw new Error(
`检测结果出现问题,没有单项检测时长,${JSON.stringify(audits[auditRef.id])}`
);
Expand Down

0 comments on commit 7bc9f88

Please sign in to comment.