forked from 0xWheatyz/SPARC
Persist async job state in PostgreSQL so results survive API restarts #120
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. When the API process restarts (e.g., deployment, crash), all pending and completed job results are lost. Users have no way to retrieve their batch results after a restart.Work
jobstable in PostgreSQL (or reuse an existing table) with columns for job ID, status, created_at, updated_at, result (JSONB), and error._jobswith equivalent database operations.Acceptance Criteria
GET /jobs/{job_id}returns the correct state for both in-progress and completed jobs.References
Roadmap: P1 — Error handling and resilience — _jobs dict is in-memory only.
This issue has already been resolved. Async job state is persisted in PostgreSQL so results survive API restarts.
Resolved by PR #34 ("feat(jobs): persist async batch job state in PostgreSQL"). Closing.