From aac109621a85c2804a4e56c4b145dea7eee9560b Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 8 Oct 2023 22:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E9=98=9F?= =?UTF-8?q?=E5=88=97=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/shared/pLimit.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/back/shared/pLimit.ts b/back/shared/pLimit.ts index 2dbbfaf6..22c7bb9c 100644 --- a/back/shared/pLimit.ts +++ b/back/shared/pLimit.ts @@ -33,12 +33,17 @@ class TaskLimit { }) this.cronLimit.on('completed', (param) => { Logger.info( - `[schedule][任务处理完成] 运行中任务数: ${this.cronLimitActiveCount - 1}, 等待中任务数: ${this.cronLimitPendingCount}, 参数 ${JSON.stringify(param)}`, + `[schedule][任务处理成功] 参数 ${JSON.stringify(param)}`, ); }); this.cronLimit.on('error', error => { Logger.error( - `[schedule][处理任务错误] 运行中任务数: ${this.cronLimitActiveCount}, 等待中任务数: ${this.cronLimitPendingCount}, 参数 ${JSON.stringify(error)}`, + `[schedule][任务处理错误] 参数 ${JSON.stringify(error)}`, + ); + }); + this.cronLimit.on('next', () => { + Logger.info( + `[schedule][任务处理结束] 运行中任务数: ${this.cronLimitActiveCount}, 等待中任务数: ${this.cronLimitPendingCount}`, ); }); this.cronLimit.on('idle', () => {