diff --git a/packages/api/src/queueAdapters/bull.ts b/packages/api/src/queueAdapters/bull.ts index ce8f4a00..f0e67168 100644 --- a/packages/api/src/queueAdapters/bull.ts +++ b/packages/api/src/queueAdapters/bull.ts @@ -31,7 +31,10 @@ export class BullAdapter extends BaseAdapter { public getJobs(jobStatuses: JobStatus[], start?: number, end?: number): Promise { return this.queue.getJobs(jobStatuses, start, end).then((jobs) => jobs.map((job) => { - job.attemptsMade++; // increase to align it with bullMQ behavior + if (typeof job?.attemptsMade === 'number') { + job.attemptsMade++; // increase to align it with bullMQ behavior + } + return job; }) );