forked from 0xWheatyz/SPARC
Persist async job state to PostgreSQL so results survive API restarts #309
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
Roadmap item: P1 Error handling and resilience
The
_jobsdict lives in process memory. Any API restart (deployment, crash, OOM kill) loses all in-progress and completed job records, leaving clients with no way to retrieve results.Work Required
jobstable to the PostgreSQL schema (columns:job_id,status,created_at,updated_at,result_json,error)_jobsdict with database queriesCREATE TABLE IF NOT EXISTSstatement that runs at startupAcceptance Criteria
/jobs/{id}endpoint/jobs) reflects all historical jobs from the databaseThis issue has already been resolved in the fork's main branch. Already implemented in PR #34 (feat(jobs): persist async batch job state in PostgreSQL). See SPARC/database.py jobs table.
Closing as completed.