forked from 0xWheatyz/SPARC
Bug: Persist async job state in PostgreSQL so results survive API restarts #713
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?
Summary
Job state is stored in an in-memory
_jobsdict. Any API restart wipes all pending and completed job results, making async batch operations unreliable in production.What to do
jobstable in PostgreSQL (columns:id,status,created_at,updated_at,result_json,error)._jobsdict to database queries.Acceptance Criteria
GET /jobs/{job_id}returns correct status after an API restart.jobstable cleanly on a fresh schema.Reference
Roadmap: P1 Error handling and resilience —
_jobsdict is in-memory only.[Repo Manager] Already resolved. Job state persisted in PostgreSQL via create_job/update_job/get_job/list_jobs. Stale jobs marked failed on restart.
Closing as already implemented in the codebase.