bunqueue v2.7.14
blog · release
bunqueue v2.7.14
Fixes 7 bugs. worker register via CLI silently expires: Server auto-unregisters workers when their TCP connection closes; one-shot CLI commands disconnect immediately, so worker list right after worker register showed nothing.
To install bunqueue v2.7.14
Section titled “To install bunqueue v2.7.14”bun add bunqueue@2.7.14npm install bunqueue@2.7.14To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”worker registervia CLI silently expires: Server auto-unregisters workers when their TCP connection closes; one-shot CLI commands disconnect immediately, soworker listright afterworker registershowed nothing. CLI now prints a stderr warning explaining transience and pointing users to the SDKWorkerclass for persistence.pulldisplayedState: unknown: Server-sideJobdoesn’t carry an explicitstatefield (state lives injobIndex), so the PULL response omitted it.src/cli/output.tsnow derives state from timestamps:completedAt→ completed, exhausted retries (attempts >= maxAttempts && startedAt > 0) → unknown (since it could be DLQ),startedAt > 0→ active,runAt > now→ delayed, else waiting. Zero-signal jobs (no timestamps) still displayunknownrather than a confident guess.job progressandjob delayerrors conflated “not found” with “not active”: Both handlers (management.tsProgress,advanced.tsMoveToDelayed) returned the literal stringJob not found or not active. They now querygetJobStateon failure and emit eitherJob not foundorJob is not active (current state: X), so operators can act on the distinction.- Client ignored env vars
TCP_PORT/HOST: Server readsTCP_PORT,HTTP_PORT,HOST; CLI client only honored--port/--host. Asymmetric. Client now readsTCP_PORT(primary, matches server) plusBUNQUEUE_TCP_PORT/BQ_TCP_PORTaliases forHOSTtoo. Priority: explicit CLI flag > env > default. queue cleanoutput saidCreated 0 jobs: Batch-id formatter used a single “Created” verb for all responses withidsarrays. Now context-aware:push→Created,queue clean→Cleaned,queue drain→Drained,dlq retry→Retried,dlq purge→Purged. Falls back toAffectedfor unknown contexts.job resultprinted literalResult: undefined: When a job’s result isundefined/null(job not completed orremoveOnComplete: true), CLI now showsNo result available (job not completed or result was removed)instead of stringifying undefined.- Short flags
-h/-vtriggered server start instead of help/version: Global parser treated unknown short args as server flags.-hnow aliases--help,-valiases--version(server’s existing-H/-p/-tshort flags unchanged).
- New
test/cli-issues.test.ts, 11 reproducer tests covering each of the 8 CLI bugs above (subprocess-spawn approach with a real server on a dedicated port). - Updated
test/server-handlers-core.test.ts, 4 callsites converted toawaitafterhandleGetProgressbecame async (needed for state disambiguation).
Internal
Section titled “Internal”formatOutputandformatSuccess(src/cli/output.ts) now accept an optionalsubcommandarg so batch-id responses can pick the right verb.handleGetProgress(src/infrastructure/server/handlers/management.ts) changed signature from syncResponseto asyncPromise<Response>to support disambiguation viagetJobState.
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.7.13 · Release on GitHub · Commits since v2.7.13 · Full changelog · All posts