update time

This commit is contained in:
2025-06-22 19:41:51 +08:00
parent e982ddb001
commit a25f7c7eb4
2 changed files with 9 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ class TimeRecorder {
endTime: number;
duration: number;
updateTime: number;
maxDuration: number = 40 * 1000; // 30s;
maxDuration: number = 30 * 1000; // 30s;
constructor() {
const now = Date.now();
this.startTime = now;
@@ -105,6 +105,7 @@ worker.on('completed', async (job) => {
const nextTime = up.nextTime + getTimeDuration();
const unread = await queue.getJob('unread');
if (!unread) {
console.log('====add unread next-time', nextTime, getTimeDuration());
addUnreadTask(nextTime);
}
}