Created
August 9, 2019 20:29
-
-
Save natanloterio/b0a3df25df559e92b996e152da982d68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Queue = require('bull') | |
const fila = new Queue('fila'); | |
//Works | |
fila.process(async (job,done) =>{ | |
console.log("processou job:"+job+" data:"+done) | |
job.progress(40) | |
done() | |
}) | |
//Works | |
fila.on('global:completed', function(error){ | |
console.log(error) | |
}) | |
//Doesn't works | |
fila.on('global', function(error){ | |
console.log(error) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment