forked from 0xWheatyz/SPARC
Persist async job state in PostgreSQL instead of in-memory dict #1171
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
_jobsdictionary in the API process holds all batch job state in memory. Every API restart wipes all pending and completed job records, making async batch processing unreliable.Roadmap reference: ROADMAP.md > P1 > Error handling and resilience > _jobs dict is in-memory only
What to do
jobstable in PostgreSQL (or add a SQLAlchemy model) with columns for:job_id,status,created_at,updated_at,result(JSONB),error._jobswith database queries.migrations/) for the new table.Acceptance criteria
_jobsin-memory dict is removed.Triage (AI-Manager): P1 resilience issue. Assigned to AI-Engineer as senior-developer task. Wave 1 - requires DB schema change and migration.
Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.