bunqueue v2.7.9
blog · release
bunqueue v2.7.9
Fixes 2 bugs and ships 1 addition. clean()/cleanAsync() returned array of empty strings (Issue #84, follow-up from @jdorner), Previously returned new Array(count).fill(''), so the result length was correct but the IDs were empty.
To install bunqueue v2.7.9
Section titled “To install bunqueue v2.7.9”bun add bunqueue@2.7.9npm install bunqueue@2.7.9To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestWhat’s new
Section titled “What’s new”- SQLite migration 11:
idx_jobs_completed_orderindex on(completed_at DESC) WHERE state = 'completed'for O(log n) recovery ordering.
Protocol
Section titled “Protocol”CountResponsenow carries an optionalids?: string[]field, populated by theCleanhandler so TCP clients receive the removed job IDs (previously only the count).
Bugfixes
Section titled “Bugfixes”clean()/cleanAsync()returned array of empty strings (Issue #84, follow-up from @jdorner), Previously returnednew Array(count).fill(''), so the result length was correct but the IDs were empty. Now returns the actualJobId[]of removed jobs end-to-end (queueControl → queueManager → TCP handler → MCP adapter → cloud commands → client).- Completed jobs lost after server restart (Issue #84, follow-up from @jdorner),
recover()did not repopulatejobIndex/completedJobs/completedJobsDatafor completed jobs in SQLite, socleanAsync('completed')after a restart found nothing to clean andstats.completedunder-reported. Added Phase 3 recovery: loads up tomaxCompletedJobs(default 50k) jobs ordered bycompleted_at DESC, populates in-memory indexes. Does not touchcustomIdMap(preserves pending-job dedup).
- 2 new regression tests in
test/client-queue-operations.test.ts(actual-ids returned, post-restart cleanup). - Updated 8 obsolete tests that asserted
clean()returned a number. - Updated
stress.test.tspersistence-under-load expectation from 100 → 200 (completed jobs now survive restart, so cumulative total is correct).
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.7.8 · Release on GitHub · Commits since v2.7.8 · Full changelog · All posts