fix: 修复时间比较逻辑错误

- 更新 template.controller.ts 中的时间比较逻辑,确保在过滤最近任务时正确比较时间戳。使用 getTime() 方法进行比较,以避免潜在的错误。
This commit is contained in:
iHeyTang 2025-09-04 23:48:19 +08:00
parent 6307b216d6
commit 9cdbed02eb
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ export class TemplateController {
// 检查是否有任务在5分钟内开始 // 检查是否有任务在5分钟内开始
const recentTasks = processingTasks.filter( const recentTasks = processingTasks.filter(
(task) => task.startedAt && task.startedAt > fiveMinutesAgo, (task) => task.startedAt && task.startedAt.getTime() > fiveMinutesAgo.getTime(),
); );
if (recentTasks.length > 0) { if (recentTasks.length > 0) {