Backoff not working
Created by: Jujunol
Description
When running Bull and provide backoff
as per the documentation here I can't seem to get the backoff
to trigger despite what I do.
I've created a minimal version:
const Queue = require('bull');
const jobData = {
"data": {
"comment": "data for job goes here"
},
"options": {
"delay": 0,
"backoff": {
"type": "exponential",
"delay": 100
}
}
};
const callbackQueue = new Queue('callback');
callbackQueue.process(function(job, done) {
console.log('MEOW');
done(new Error('Backoff occur'));
});
callbackQueue.add(jobData['data'], jobData['options']);
As you'd expect, the MEOW
should occur over-and-over ; however, it will only occur once
Bull version
"bull": "3.5.2",
Additional information
OS: Windows 10