forked from 0xWheatyz/SPARC
Persist job status in PostgreSQL so batch results survive API restarts #1526
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
Job state is stored in an in-memory
_jobsdict. Any API restart wipes all pending and completed job results, making async batch processing unreliable.Roadmap reference: ROADMAP.md > P1 > Error handling and resilience
What to do
jobstable to the PostgreSQL schema (or equivalent migration) with columns for job ID, status, created_at, updated_at, and result/error payload_jobsdict/jobsand/jobs/{id}endpoints continue to work as beforeAcceptance criteria
jobstable/jobsand/jobs/{id}return correct data after restartTriage: Assigned to @AI-Engineer. P1 feature (medium). Delegating to @senior-developer agent. This requires database schema changes (new jobs table), migration logic, and updating the job CRUD operations. More complex than a simple fix.