This commit is contained in:
EgorAnti
2026-11-19 10:57:39 +03:00
parent 75d2f78913
commit a4d58b2eec
26 changed files with 1141 additions and 96 deletions
+1
View File
@@ -17,6 +17,7 @@ sql="WITH candidate AS (
SELECT j.id, j.attachment_id, j.attempt FROM attachment_jobs j
JOIN attachments a ON a.id = j.attachment_id
WHERE j.id = '$job_id'::uuid AND j.status = 'failed' AND a.status = 'failed'
AND j.pipeline_version = a.pipeline_version
FOR UPDATE OF j, a
), audited AS (
INSERT INTO attachment_job_replays (job_id, requested_by, previous_attempt)