TypeError when retrying jobs.
Created by: mscharley
Description
We're getting an error trying to retry queue items. This is a manual process for us, after we fix the bug that led to the item failing in the first place then we run this task which retries them all.
The error we're receiving is as follows:
TypeError: queue.client.reprocessJob is not a function
at Object.reprocessJob (/usr/src/app/node_modules/bull/lib/scripts.js:393:25)
at Job.retry (/usr/src/app/node_modules/bull/lib/job.js:265:18)
at Object.<anonymous> (/usr/src/app/src/lambda/ResetQueue.ts:29:13)
at next (native)
at fulfilled (/usr/src/app/src/lambda/ResetQueue.ts:4:58)
Test code to reproduce
const jobs = await queue.getFailed();
logger.info(`Resetting ${jobs.length} failed jobs in ${queueName}.`);
for (const job of jobs) {
// this is the failing line.
job.retry();
}
Bull version
Affects Bull 3.3.9, is fine in 3.3.8.
Additional information
For now, we're rolling back to 3.3.8. If you need any more info then please ask.