[PRISM] Block HTTP 502 sources; errors 105 to 19
lint / hygiene (push) Failing after 30s
standard / check (push) Successful in 12s
lint / hygiene (pull_request) Failing after 24s
standard / check (pull_request) Successful in 10s

This commit is contained in:
architect committed 2026-11-29 22:53:21 +03:00
1 parent fafe6b6e5d
commit 1eb2b4307f
4 files changed
+14 -9

No files matched your search

+5 -2
View File
@@ -145,8 +145,11 @@ while True:
cur.execute("update prism.tasks set status='done', finished_at=now() where id=%s", (task_id,))
print("done", task_id, kind, flush=True)
except Exception as e:
cur.execute("update prism.tasks set status='error', error=%s, finished_at=now() where id=%s",
(str(e)[:300], task_id))
msg = str(e)[:300]
bad = any(x in msg.lower() for x in ("no json", "empty text", "source missing", "no text", "no usable", "http error"))
status = "blocked" if bad else "error"
cur.execute("update prism.tasks set status=%s, error=%s, finished_at=now() where id=%s",
(status, msg, task_id))
cur.execute("""insert into prism.runs(model_id,kind,status,worker,model,error,started_at,finished_at)
values (%s,'worker7b','error','229',%s,%s,now(),now())""",
(mid, "qwen2.5:3b", str(e)[:300]))