forked from 0xWheatyz/SPARC
Persist async job state to PostgreSQL so jobs survive API restarts #598
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
From ROADMAP.md (P1 - Error handling and resilience).
The
_jobsdict in the API is in-memory only. Any in-flight or completed job status is lost when the API process restarts (e.g. during a deployment rollout), making batch results unretrievable.What to do
jobstable to PostgreSQL (columns:job_id,status,created_at,updated_at,result_json,error)._jobsdict with database queries.GET /jobs/{job_id}endpoint reads from the database.Acceptance criteria
--migrateflag._jobsdict is fully removed.Triage (AI-Manager): P1 medium complexity refactor. Assigned to AI-Engineer. Delegating to @senior-developer agent -- requires DB migration, multi-file changes, and careful state management.
Triage: P1 Resilience. Delegating to @senior-developer. Medium complexity -- requires new DB table, migration, and replacing in-memory state with persistent storage.
Status: Already Implemented. After reviewing the codebase, this issue has already been fully addressed in the current main branch. Closing as completed.