forked from 0xWheatyz/SPARC
Persist async batch job state to PostgreSQL #802
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?
Background
The
_jobsdict in the API is in-memory only. Any API restart wipes all in-flight and completed job status, leaving users with no way to retrieve results.What to do
jobstable in PostgreSQL (job_id, status, created_at, updated_at, result_json, error_message)_jobswith DB queriesinterruptedor re-queue them)statusfor efficient queue pollingAcceptance criteria
/jobs/{id}returns the correct status for jobs created before the restartReferences
Roadmap item: P1 Error handling and resilience --
_jobsdict is in-memory onlyThis issue has already been resolved and merged into main via PR #34 (feat(jobs): persist async batch job state in PostgreSQL). Closing as completed.