Skip to content

Instantly share code, notes, and snippets.

@natanloterio
Created August 9, 2019 20:29
Show Gist options
  • Save natanloterio/b0a3df25df559e92b996e152da982d68 to your computer and use it in GitHub Desktop.
Save natanloterio/b0a3df25df559e92b996e152da982d68 to your computer and use it in GitHub Desktop.
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