Event chaining no longer works
Created by: ferronrsmith
version : 3.0.0-rc4
taskQueue.on('ready', () => {
// Queue ready for job
// All Redis connections are done
logger.trace('Task Queue is now ready');
}).on('error', (error) => {
logger.error(error);
}).on('active', (job) => {
logTask(job, 'Started');
}).on('stalled', (job) => {
// Job that was considered stalled. Useful for debugging job workers that crash or pause the event loop.
logger.trace('job stalled', job);
}).on('completed', (job) => {
// Job completed with output result!
logTask(job, 'Completed');
});
Errors
/bull-queue/worker.js:39
}).on('error', (job) => {
^
TypeError: taskQueue.on(...).on is not a function
at Object.<anonymous> (/bull-queue/worker.js:39:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3