Worker queue module for Nxus applications using Redis and Bull for pub/sub background tasks. Version 4.0.6 is current. Uses Bull for robust, Redis-backed job queues with features like delayed jobs, retries, and job completion notifications via promises. Differentiator: integrates tightly with Nxus framework but can be used standalone. Release cadence is irregular; last release was 2020.
npm install nxus-worker-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows registering a worker handler for 'sendEmail' tasks, queueing a task with data, and awaiting job completion via job.finished().
If upgrading from 3.x, ensure Bull is upgraded to v3. Job opts may differ.
Always return a promise from worker handler, even if async.
Use job.finished() after workerQueue.task() to await result.
Pass options to Bull queue directly, not via worker() third arg.
Set worker_queue.redis_url in config or export REDIS_URL environment variable.
npm install bull --save
Use import { workerQueue } from 'nxus-worker-queue'Start redis-server or set REDIS_URL env variable
const job = await workerQueue.task('name', data); await job.finished();