forked from 0xWheatyz/SPARC
Persist job state in PostgreSQL so batch results survive API restarts #1633
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 in the API is held in memory. Any restart or crash loses all in-progress and completed job records, breaking the async batch workflow for users.What to do
jobstable in PostgreSQL with columns for:job_id,status,created_at,updated_at,result(JSONB),error._jobsdict operations (create, update status, read) to use this table viaDatabaseClient.Acceptance criteria
jobstable exists after running the migration.Triage (AI-Manager): P1 refactor (medium complexity). Assigned to @AI-Engineer (senior-developer role). Requires DB schema design for a jobs table and migration of in-memory state to PostgreSQL. Higher complexity warrants senior-level attention.