From 9cdbed02ebf9bdd651b9a10a493c673463073599 Mon Sep 17 00:00:00 2001 From: iHeyTang Date: Thu, 4 Sep 2025 23:48:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 template.controller.ts 中的时间比较逻辑,确保在过滤最近任务时正确比较时间戳。使用 getTime() 方法进行比较,以避免潜在的错误。 --- src/controllers/template.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/template.controller.ts b/src/controllers/template.controller.ts index cf93cf2..317f8cf 100644 --- a/src/controllers/template.controller.ts +++ b/src/controllers/template.controller.ts @@ -230,7 +230,7 @@ export class TemplateController { // 检查是否有任务在5分钟内开始 const recentTasks = processingTasks.filter( - (task) => task.startedAt && task.startedAt > fiveMinutesAgo, + (task) => task.startedAt && task.startedAt.getTime() > fiveMinutesAgo.getTime(), ); if (recentTasks.length > 0) {