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);
|
||||
});
|
||||
|
||||
worker.on('progress', (job) => {
|
||||
console.log(`[${queueName}] Job ${job.id} progress:`, job.progress());
|
||||
// job.progress is a property (the value set by updateProgress), not a function
|
||||
worker.on('progress', (job, progress) => {
|
||||
console.log(`[${queueName}] Job ${job.id} progress:`, progress);
|
||||
});
|
||||
|
||||
return worker;
|
||||
|
|
|
|||
Loading…
Reference in a new issue