Skip to content

Instantly share code, notes, and snippets.

@natanloterio
Created August 9, 2019 20:28
Show Gist options
  • Save natanloterio/0d8e99465dea5d29a083aacc631fc2c1 to your computer and use it in GitHub Desktop.
Save natanloterio/0d8e99465dea5d29a083aacc631fc2c1 to your computer and use it in GitHub Desktop.
var Queue = require('bull');
var fila = new Queue('fila', 'redis://192.168.0.11:6379');
const job = fila.add({
foo: 'bar'
})
//Doesn`t works
fila.on('completed',(job, result) => {
console.log(`Job completed ${result}`)
})
//Works
fila.on('global:completed',(job, result) => {
console.log(`Job completed ${result}`)
})
fila.on('global:progress', (job,data)=>{
console.log(job,data)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment