bunqueue v2.7.20
blog · release
bunqueue v2.7.20
Fixes 3 bugs. drain() left stale rows in SQLite (embedded): queue.drain() cleared the in-memory index and counts but never deleted the SQLite rows, so drained jobs resurrected via getJobState/getJob/getWaiting/getJobs and would reload on…
To install bunqueue v2.7.20
Section titled “To install bunqueue v2.7.20”bun add bunqueue@2.7.20npm install bunqueue@2.7.20To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”A live end-to-end pass exercised every feature locally (18 areas, ~317 checks); all 2.7.19 fixes held, and three pre-existing bugs were found and fixed. Each ships a reproducing test (test/audit-*.test.ts).
drain()left stale rows in SQLite (embedded):queue.drain()cleared the in-memory index and counts but never deleted the SQLite rows, so drained jobs resurrected viagetJobState/getJob/getWaiting/getJobsand would reload on restart.drainQueuenow deletes each drained job’s row (via the samesafeDeleteJobpathclean/obliterateuse, which also clears any pending write-buffer entry). Only waiting/delayed/prioritized jobs are drained (active jobs untouched). (application/operations/queueControl.ts)- Workflow
waitFortimeout ran saga compensation twice: on awaitFortimeout,runWaitFor()compensated and then threw a plainError, whichprocessStep’s catch re-compensated. It now throws theWaitForSignalErrorsentinel (and emitsworkflow:failedonce) so compensation runs exactly once. The signal-success path, normal step-failure path andforEachcompensation are unchanged. (client/workflow/executor.ts) - Auto-batch
add()swallowed server rejections: when the server rejected aPUSHB(e.g. auth failure),addBulkreturned[]and the auto-batcher resolved callers withundefinedinstead of throwing, so a batchedqueue.add()silently appeared to succeed (the server correctly persisted nothing, this was an error-propagation defect, not an auth bypass).addBulknow throws on!response.ok(mirroring the single-PUSHpath), so all batched callers reject; an OK-but-empty response still returns[]. (client/queue/operations/add.ts)
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.7.19 · Release on GitHub · Commits since v2.7.19 · Full changelog · All posts