forked from 0xWheatyz/SPARC
Persist job state to PostgreSQL so batch results survive API restarts #96
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The
_jobsdict in the API is in-memory only. Any API restart (deploy, crash) discards all in-progress and completed job state, making async batch analysis unreliable.Work
jobstable in PostgreSQL (columns:job_id,status,created_at,updated_at,result_json,error)._jobsdict with database queries.GET /jobs/{job_id}) reads from the database.RETURNINGclauses or transactions as appropriate).Acceptance Criteria
GET /jobs/{job_id}._jobsin-memory dict is no longer used for job tracking.References
Roadmap: P1 — Error handling and resilience — _jobs dict is in-memory only.