forked from 0xWheatyz/SPARC
Persist batch job status in PostgreSQL so job state survives API restarts #71
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 is in-memory only. Any batch job status (pending, running, results) is lost when the API process restarts.Work
jobstable in PostgreSQL with columns for job ID, status, created_at, updated_at, and result payload (JSONB)._jobsdict with database queries.GET /jobs/{job_id}andGET /jobsendpoints to query the database.Acceptance Criteria
References
Roadmap: Error handling and resilience —
_jobsdict is in-memory only.Resolved. Batch job state is now persisted in a PostgreSQL
jobstable. Implemented in PR #34 (merged). SeeSPARC/database.py.