bunqueue v2.8.7
Fixes 18 bugs. GET /queues/:q/jobs/list?status=<state> ignored the filter, only state was read, so it returned the whole queue regardless of the requested state (#95).
To install bunqueue v2.8.7
Section titled “To install bunqueue v2.8.7”bun add bunqueue@2.8.7npm install bunqueue@2.8.7To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”A full audit of the HTTP REST API (every endpoint) and the TCP protocol (all 81 commands + client SDK), triggered by #95, surfaced a class of silent bugs where one layer dropped or renamed a parameter so a documented feature was quietly ignored, the call “succeeded” but did the wrong thing. Every confirmed case is fixed and verified by an exhaustive live end-to-end run (91 HTTP checks, all 81 TCP commands) plus unit tests.
HTTP routes
GET /queues/:q/jobs/list?status=<state>ignored the filter, onlystatewas read, so it returned the whole queue regardless of the requested state (#95). Now acceptsstatus,state, andstates, each repeatable and comma-separated.POST /jobs/:id/ackandPOST /jobs/:id/faildropped thetoken(lock ownership) field.PUT /jobs/:id/prioritydroppedlifo(tie-break ordering).POST /cronsdroppedimmediately,skipIfNoWorker,preventOverlap, andjobOptions.- CORS headers were missing on
/health,/healthz,/live,/ready,/prometheus,/gc, and/heapstats, so browser dashboards on another origin could not read them.
TCP protocol / client SDK
ExtendLocks(batch lock renewal): the client sent a singulardurationbut the handler reads a per-iddurations[]array, and readextendedfrom a response that returnscount, batch lock renewal silently kept the old TTL.RetryDlq: the client sentidbut the handler readsjobId, so retrying a single DLQ entry retried the entire DLQ.PromoteJobs: the client readpromotedfrom a response that returnscount, so it always reported 0 promoted jobs.Clean: the client senttypebut the handler readsstate, so the state filter was ignored.UnrecoverableErrorover TCP: theunrecoverableflag on FAIL was dropped server-side, so unrecoverable jobs were retried per theirmaxAttemptsinstead of failing immediately (worked only in embedded mode).- Worker
lockDurationwas never sent aslockTtlon PULL, so the server always used its 30s default regardless of the configured value. GetLogsignored thestart/endpagination parameters the client already sent.- Scheduled (cron) jobs dropped
priority.
Counts consistency
getJobCounts/getStatsundercountedwaiting-children: jobs blocked ondependsOn(waitingDeps) report statewaiting-childrenand appear ingetJobs({ state: 'waiting-children' }), but were omitted from the count. The count now matches the reported state and the listed jobs.
Config input validation & hardening
- Config endpoints no longer break on non-numeric input.
SetStallConfig/SetDlqConfigcoerce numeric strings and drop non-numeric garbage (so the manager keeps its default) , previously a stringstallIntervalreached numeric comparisons asNaNand silently disabled stall detection for the queue.RateLimit/SetConcurrencynow reject a non-finitelimitinstead of storingNaN. PUT /queues/:q/concurrencynow accepts the naturalconcurrencyfield as well aslimit(sending{ "concurrency": N }previously silently did nothing).GET /queues/:q/dlqsupports optional?limit/?offsetpagination and returnstotal.- The
Cronresponse now echoes the jobpriority; a singlePULLno longer sends a redundant batchcount.
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.6 · Release on GitHub · Commits since v2.8.6 · Full changelog · All posts