bunqueue v2.7.6
blog · release
bunqueue v2.7.6
Fixes 7 bugs. Systemic silent no-op in ~20 job methods (Issue #82 follow-up), Across 6 factories (processor.ts, jobProxy.ts, flowJobFactory.ts, jobConversion.ts, sandboxed worker, flow), many job methods (retry, moveToWait…
To install bunqueue v2.7.6
Section titled “To install bunqueue v2.7.6”bun add bunqueue@2.7.6npm install bunqueue@2.7.6To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”- Systemic silent no-op in ~20 job methods (Issue #82 follow-up), Across 6 factories (
processor.ts,jobProxy.ts,flowJobFactory.ts,jobConversion.ts,sandboxed worker, flow), many job methods (retry,moveToWait,updateProgress,log,remove, etc.) were hardcoded to no-op or silently returned stale values in TCP mode. Same class of silent corruption as the original #82 report. All wired to real handlers with explicit errors on unsupported transitions. job.retry()BullMQ contract: Previously always routed toretryDlq, which silently no-op’d when the job was not in DLQ (e.g.removeOnFail: true, or retry attempted before DLQ persistence). Now state-dispatched:failed→retryDlq(throws if 0),active→moveActiveToWait,waiting/prioritized/delayed→no-op, other→throw.moveToWaitsemantic divergence between embedded and TCP: Embedded calledmoveActiveToWait(active→waiting) while the TCP server handler calledpromote()(delayed→waiting). Same API, opposite outcomes. Server handler now state-dispatches to match embedded;jobProxyembedded path also state-dispatches.Queue.obliterate()leaked active jobs + completed state + SQLite rows: Only shard state was cleared;jobIndex(processing variant),processingShards,completedJobs,completedJobsData,jobResults,jobLogs,jobLocks,repeatChain,customIdMap, DLQ, and persistence tables all survived. Pagination reported wrong counts, memory leaked, obliterated jobs could re-materialize after restart. Now fully purged.- Sandboxed worker
ModuleNotFoundon concurrent spawn (macOS), Two root causes: (1)$TMPDIRtrailing slash produced//in wrapper path; (2) concurrentnew Worker()raced for Bun’s bundler cache. Fixed by (1)path.joinnormalization +fsyncon write + existence poll that throws on miss, and (2) serializing the first worker spawn so the bundle is cached before siblings load. res.oktruthy read onunknown: 4 sites (extendLockhandlers,moveToWait) used looseres.ok ? x : y; harmonized to=== true.jobProxy.extendLockdropped the user-provided token in TCP mode: Server sawnulland could reject or no-op depending onjobLocksownership. Token now passed through.
- New
test/obliterate-clears-completed.test.ts(3 tests: post-complete, pagination, active-job purge). - New
test/retry-contract.test.ts(2 tests: BullMQ contract on DLQ and non-DLQ failed jobs). - New
test/movetowait-semantics.test.ts(3 tests: delayed, active, waiting idempotence). - New
test/audit-unwired-processor-methods.test.ts+test/wired-job-methods-embedded.test.tsproving every previously-unwired method is now reachable. - Post-condition assertions added for
remove()inside processor.
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.7.5 · Release on GitHub · Commits since v2.7.5 · Full changelog · All posts