redis-backed distributed task queue with grouped concurrency, retries, and rate limiting.
src/
index.js - default export
queue.js - Queue class
tests/
queue.test.js
make up # start redis via docker compose
make test # run tests
make down # stop redis
redis must be running on localhost:6379 for tests.
- plain javascript, ESM, no build step
- single file implementation
- uses
redisnpm package (node-redis), not ioredis @prsm/msfor parsing duration strings ("100ms", "5s", "1m")- types generated from JSDoc via
make types - cleanup timer is unref'd so it won't keep the process alive
- pushAndWait is distributed via redis pub/sub (queue:result:)
- group workers are discovered cross-instance via redis pub/sub (queue:group:notify) and key scan at startup
tests use vitest. each test flushes redis in beforeEach. sequential execution.
npm publish --access public
prepublishOnly generates types automatically.