Events
import { Queue } from 'bullmq';
const myQueue = new Queue('Paint');
myQueue.on('waiting', (job: Job) => {
// Job is waiting to be processed.
});import { Worker } from 'bullmq';
const myWorker = new Worker('Paint');
myWorker.on('drained', () => {
// Queue is drained, no more jobs left
});
myWorker.on('completed', (job: Job) => {
// job has completed
});
myWorker.on('failed', (job: Job) => {
// job has failed
});Manual trim events
Read more:
Last updated
Was this helpful?