Registry / devops / queue-farm

queue-farm

JSON →
library2.2.1jsnpmunverified

Queue-farm is a Redis-backed job queue that executes jobs in order per named queue. Version 2.2.1 is stable with moderate release cadence. Unlike Bull or Kue, it enforces sequential execution within a queue but allows parallelism across queues. It uses ioredis as its sole peer dependency and provides Manager and Worker classes with options for timeouts, retries, and concurrency. Suitable for simple ordered job processing without advanced scheduling.

npm install queue-farm
INSTALL
IMPORT
SIG · QUEUE-FARM
Q
queue-farm
devopsjavascriptv2.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

queueFarm
const queueFarm = require('queue-farm')
import queueFarm from 'queue-farm'
queue-farm uses CommonJS; dynamic import() works in ESM but default import does not.
Manager
const { Manager } = require('queue-farm')
const Manager = require('queue-farm').Manager
Named export is accessible via destructured require.
Worker
const { Worker } = require('queue-farm')
const Worker = queueFarm.Worker
Worker is exported as a named property of the module.

Shows basic setup: create a manager, push a job, create a worker, and start listening.

const queueFarm = require('queue-farm'); const manager = queueFarm.createManager({ redis: process.env.REDIS_URL ?? 'redis://localhost:6379' }); manager.push('emails', { to: 'user@example.com', subject: 'Hello' }); const worker = queueFarm.createWorker(async (queue, [job]) => { console.log(`Processing ${queue}: ${JSON.stringify(job)}`); }); worker.listen();
Debug
Known issues
breakingioredis version must be ^4.2.0; v3 or v5 may cause connection issues.
fix
Ensure `npm list ioredis` shows 4.x, reinstall if needed.
affects: >=1.0.0
gotchaRedis connection should be exclusive to queue-farm; sharing may cause conflicts.
fix
Create a dedicated Redis client for queue-farm using `new Redis()` or connection string.
affects: >=0.0.0
gotchaJob data is JSON-encoded; non-serializable types (Functions, undefined) will cause errors.
fix
Pass only JSON-serializable values as job data.
affects: >=0.0.0
gotchadefault timeout is 30000ms; long-running jobs may be retried prematurely.
fix
Set a larger timeout in options if jobs take longer than 30 seconds.
affects: >=0.0.0
deprecatedThe `deleteJobs` option defaults to true; setting to false may lead to Redis memory leaks.
fix
Leave deleteJobs as true unless debugging; manually clean up Redis if disabled.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'queue-farm'
Package not installed or incorrect import path.
fix
Run `npm install queue-farm ioredis`.
TypeError: queueFarm.createManager is not a function
Using default import in ESM or destructuring incorrectly.
fix
Use `const queueFarm = require('queue-farm')` for CJS or `import queueFarm from 'queue-farm'` with a default import in ESM, but note default import is not supported; use dynamic import.
ReplyError: MOVED ...
Redis cluster requires slots; queue-farm does not support cluster natively.
fix
Use a single Redis instance or ensure cluster client handles redirects; queue-farm may not work with cluster.
Upgrade
Version history
2.2.1latest on npm
Audit
Dependencies
ioredisrequiredRequired for Redis connection; needs version ^4.2.0.
Agent activity
4 hits · last 30 days
node
4
Resources
queue-farm — npm install queue-farm · libregistry