fix: atomic import swap, disk/DB replace consistency, guarded pipeline loop

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-11 15:27:48 +02:00
parent fe973343ad
commit 88ef4149d9
5 changed files with 119 additions and 26 deletions
+6 -2
View File
@@ -40,8 +40,12 @@ def run_forever() -> None:
time.sleep(IDLE_SLEEP)
continue
print(f"worker: claimed job {job_id}", flush=True)
run_pipeline(conn, job_id, adapters, resolver=resolver, tagger=tagger,
upgrade_cutoff=mcfg.quality_cutoff)
try:
run_pipeline(conn, job_id, adapters, resolver=resolver, tagger=tagger,
upgrade_cutoff=mcfg.quality_cutoff)
except Exception as e: # one bad job must not take down the worker loop
print(f"worker: pipeline failed for job {job_id}: {e}", flush=True)
conn.rollback()
if mcfg.enabled:
try:
reconcile(conn, job_id, mcfg)