Skip to content
Get started
Get started
bunqueue v2.7.9
View Markdown
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.

bun add bunqueue@2.7.9
npm install bunqueue@2.7.9
bun add bunqueue@latest
  • SQLite migration 11: idx_jobs_completed_order index on (completed_at DESC) WHERE state = 'completed' for O(log n) recovery ordering.
  • CountResponse now carries an optional ids?: string[] field, populated by the Clean handler so TCP clients receive the removed job IDs (previously only the count).
  • 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. Now returns the actual JobId[] 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 repopulate jobIndex/completedJobs/completedJobsData for completed jobs in SQLite, so cleanAsync('completed') after a restart found nothing to clean and stats.completed under-reported. Added Phase 3 recovery: loads up to maxCompletedJobs (default 50k) jobs ordered by completed_at DESC, populates in-memory indexes. Does not touch customIdMap (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.ts persistence-under-load expectation from 100 → 200 (completed jobs now survive restart, so cumulative total is correct).

← bunqueue v2.7.8 · Release on GitHub · Commits since v2.7.8 · Full changelog · All posts