fix: timeout interva ltoo short in cleanup

This commit is contained in:
alikia2x (寒寒) 2025-03-30 20:48:40 +08:00
parent 64a7f13da7
commit da8b2d3b4d
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -372,7 +372,7 @@ export const scheduleCleanupWorker = async (_job: Job) => {
SELECT id, aid, type SELECT id, aid, type
FROM snapshot_schedule FROM snapshot_schedule
WHERE status IN ('pending', 'processing') WHERE status IN ('pending', 'processing')
AND started_at < NOW() - INTERVAL '5 minutes' AND started_at < NOW() - INTERVAL '30 minutes'
`; `;
const { rows } = await client.queryObject<{ id: bigint; aid: bigint; type: string }>(query); const { rows } = await client.queryObject<{ id: bigint; aid: bigint; type: string }>(query);
if (rows.length === 0) return; if (rows.length === 0) return;