javascript – Node.js -bull queue implementation: Handle result from promise
I am trying to implement a queue as a separate processor
imageProcessQueue.process(__dirname+'/process-queue.js');
In process-queue.js
i m handling
module.exports = async function (job) {
//some jobs
return Promise.resolve({status:"completed"});
}
But the queue completed
event I can’t read the results from the promise which i return from the processor
imageProcessQueue.on('completed', function (job, result) {
// can see this output
console.log('completed')
//never logs anything always empty
console.log(result)
})
Read more here: Source link