Registry / devops / deps_safe_kue

deps_safe_kue

JSON →
library0.12.0jsnpmunverified

A priority job queue backed by Redis, originally built by Automattic and now unmaintained. This fork (deps_safe_kue v0.12.0) fixes legacy dependency issues without adding new features. It supports delayed jobs, parallel work distribution, job events, TTL, retries with backoff, graceful shutdown, full-text search, a RESTful JSON API, and a rich UI. The package is ESM-only in recent versions (if following upstream) though the 0.x series is mostly CJS. Known to be in maintenance mode; users should consider alternatives like Bull or Bee-Queue for active development.

npm install deps_safe_kue
INSTALL
IMPORT
SIG · DEPS_SAFE_KUE
D
deps_safe_kue
devopsjavascriptv0.12.0
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.

createQueue
import kue from 'kue'; const queue = kue.createQueue();
const kue = require('kue'); const queue = kue.createQueue();
Although CJS require works in 0.x, future versions may drop it. ESM named import not available for createQueue.
Job
import { Job } from 'kue';
const Job = require('kue').Job;
Named export Job available in ESM. CJS equivalent is kue.Job.
Queue (type)
import type { Queue } from 'kue';
import { Queue } from 'kue';
Queue is an interface, not a runtime value; use type import in TypeScript.

Creates a Kue queue, processes email jobs, and enqueues a sample job.

import kue from 'kue'; import redis from 'redis'; const client = redis.createClient(); const queue = kue.createQueue({ redis: { host: '127.0.0.1', port: 6379 } }); queue.process('email', (job, done) => { console.log(`Processing job ${job.id}`); done(); }); const job = queue.create('email', { title: 'welcome email', to: 'user@example.com', }).save(err => { if (err) console.error(err); else console.log(`Job ${job.id} created`); }); setTimeout(() => process.exit(0), 1000);
Debug
Known issues
deprecatedKue is no longer maintained upstream; this fork only fixes dependencies.
fix
Migrate to Bull or Bee-Queue for active support and modern features.
affects: >=0.9.0
breakingRedis connection options changed significantly in 0.10.x.
fix
Use { redis: { host, port, auth } } instead of passing a client directly.
affects: >=0.10.0
breakingJob progress callback signature changed; (progress) => was replaced by (progress, data) =>.
fix
Update progress handlers to accept two arguments.
affects: >=0.9.0
gotchaJobs with TTL may appear stuck if 'removeOnComplete' is not set.
fix
Set job.removeOnComplete(true) if you don't need completed jobs persisted.
affects: >=0.8.0
deprecatedThe RESTful JSON API is incomplete and not actively maintained.
fix
Consider using a dedicated monitoring tool instead of the built-in API.
affects: >=0.10.0
Errors
Common errors & fixes
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server is not running or is unreachable on localhost:6379.
fix
Start Redis with 'redis-server', or configure connection via kue.createQueue({ redis: { host: 'your_host', port: 6379 } }).
TypeError: kue.createQueue is not a function
Using CJS require on an ESM-only build or missing default export.
fix
Use import kue from 'kue' or switch to CommonJS: const kue = require('kue').default; if needed.
Error: Job type is required
Calling queue.create() without a first argument (job type string).
fix
Always provide a job type, e.g., queue.create('email', data).
Error: job.save() callback not a function
Passing a non-function or no callback to job.save().
fix
Ensure you pass a function: job.save(err => { ... }).
Upgrade
Version history
0.12.0latest on npm
Audit
Dependencies
redisrequiredKue requires a Redis server to function; it uses the node_redis client.
Agent activity
9 hits · last 30 days
node
6
Resources
deps_safe_kue — npm install deps_safe_kue · libregistry