Fix worker/index.js: job.progress is a property not a function in BullMQ v3+
This commit is contained in:
parent
44759391e5
commit
cc174c4977
1 changed files with 3 additions and 2 deletions
|
|
@ -26,8 +26,9 @@ const createWorker = (queueName, handler) => {
|
||||||
console.error(`[${queueName}] Job ${job.id} failed:`, err.message);
|
console.error(`[${queueName}] Job ${job.id} failed:`, err.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
worker.on('progress', (job) => {
|
// job.progress is a property (the value set by updateProgress), not a function
|
||||||
console.log(`[${queueName}] Job ${job.id} progress:`, job.progress());
|
worker.on('progress', (job, progress) => {
|
||||||
|
console.log(`[${queueName}] Job ${job.id} progress:`, progress);
|
||||||
});
|
});
|
||||||
|
|
||||||
return worker;
|
return worker;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue