fix: timeout interva ltoo short in cleanup
This commit is contained in:
parent
64a7f13da7
commit
da8b2d3b4d
@ -371,8 +371,8 @@ export const scheduleCleanupWorker = async (_job: Job) => {
|
|||||||
const query = `
|
const query = `
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user