BUG: POST /assets/batch-trim creates jobs table row with wrong job_type — no matching pg_enum value #70
Loading…
Reference in a new issue
No description provided.
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?
Fixed in migration
016-fix-job-type-enum.sql— addedexpires_atcolumn tojobswith 24h TTL on trim rows, and added the missing enum values so the inserted job_type matches reality. See #75 / #90.Fix Plan — #70 batch-trim creates jobs row with wrong job_type
Root cause: batch-trim creates a jobs row with type 'trim' and status 'queued'. The in-database jobs row for trim jobs has no associated BullMQ job ID visible in /jobs. If trim job fails, the jobs row stays 'queued' forever.
Fix: Either make jobs.js also query the DB jobs table (UNION with BullMQ state), or remove the INSERT in batch-trim entirely and track status purely via temp_segments.
Files: src/routes/assets.js (batch-trim), src/routes/jobs.js
Effort: ~1h
**Priority: P2 — data consistency
jobsrow is orphaned — no status lifecycle,job_typeenum is stale #90