update: add randomness in interval of re-scheduling when no proxy available

This commit is contained in:
alikia2x (寒寒) 2025-04-13 23:55:43 +08:00
parent d80a6bfcd9
commit 9ef513eed7
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -234,7 +234,7 @@ export const takeBulkSnapshotForVideosWorker = async (job: Job) => {
"fn:takeBulkSnapshotForVideosWorker", "fn:takeBulkSnapshotForVideosWorker",
); );
await bulkSetSnapshotStatus(client, ids, "completed"); await bulkSetSnapshotStatus(client, ids, "completed");
await bulkScheduleSnapshot(client, aidsToFetch, "normal", Date.now() + 2 * MINUTE); await bulkScheduleSnapshot(client, aidsToFetch, "normal", Date.now() + 20 * MINUTE * Math.random());
return; return;
} }
logger.error(e as Error, "mq", "fn:takeBulkSnapshotForVideosWorker"); logger.error(e as Error, "mq", "fn:takeBulkSnapshotForVideosWorker");