This commit is contained in:
张成
2025-12-30 16:30:37 +08:00
parent 956cfe88f8
commit b49bd658a6
2 changed files with 3 additions and 3 deletions

View File

@@ -38,14 +38,14 @@ class BaseTask {
if (existingLock && (now - existingLock) < 5 * 60 * 1000) {
const remainingTime = Math.ceil((5 * 60 * 1000 - (now - existingLock)) / 1000);
return {
success: false,
allowed: false,
reason: `任务 ${this.taskType} 正在添加中,请等待 ${remainingTime}`
};
}
// 获取锁
this.taskLocks.set(lockKey, now);
return { success: true };
return { allowed: true };
}
/**

View File

@@ -25,7 +25,7 @@ module.exports = {
acquire: 30000,
idle: 10000
},
logging: true
logging: false
},
// API 路径配置(必需)