feat(worker): claim_next skips per-item paused jobs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-15 12:01:38 +02:00
parent 20869bdc13
commit bff590a00f
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ def claim_next(conn: psycopg.Connection) -> str | None:
cur.execute(
"""
SELECT id FROM "Job"
WHERE state = 'requested'
WHERE state = 'requested' AND NOT paused
ORDER BY "createdAt" ASC
FOR UPDATE SKIP LOCKED
LIMIT 1