Closed Ehesp closed 8 years ago
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.
job.retry();
Fixed in v2
Trying to build a test for the Job rety() method, however hitting an issue:
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.