Job#retry() doesn't fire
Ehesp opened this issue · comments
Elliot Hesp commented
Trying to build a test for the Job rety() method, however hitting an issue:
it('Should allow the instance of the job to retry itself', (done) => {
let count = 0;
global.singleJob = function queueHandler() {
console.log('doing job')
count++;
if (count === 2) {
return done();
}
return Promise.reject();
};
const job = Hook.create('test', {
runs: 'singleJob',
}).onFailure(() => {
job.retry();
});
});
job.retry();
is a function, but since it's a multi-exec it's async, but doesn't seem to be triggering the second job.
Elliot Hesp commented
Fixed in v2