diff --git a/src/app.module.ts b/src/app.module.ts index 2e721c3..6aea8dd 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -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', diff --git a/src/utils/dingtalkRobot.ts b/src/utils/dingtalkRobot.ts index f0bb921..c0838d8 100644 --- a/src/utils/dingtalkRobot.ts +++ b/src/utils/dingtalkRobot.ts @@ -8,7 +8,7 @@ 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); } @@ -16,7 +16,7 @@ class DingtalkRobot { // 任务运行失败告警 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); } diff --git a/src/utils/taskRun.ts b/src/utils/taskRun.ts index 42d734e..e98067e 100644 --- a/src/utils/taskRun.ts +++ b/src/utils/taskRun.ts @@ -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])}` );