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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user