Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit b4d10aa

Browse files
committed
fix maxAttempts calculation
1 parent 786702e commit b4d10aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/backend/src/queue/QueueProcessorService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function getJobInfo(job: Bull.Job | undefined, increment = false): string {
6767

6868
// onActiveとかonCompletedのattemptsMadeがなぜか0始まりなのでインクリメントする
6969
const currentAttempts = job.attemptsMade + (increment ? 1 : 0);
70-
const maxAttempts = job.opts ? job.opts.attempts : 0;
70+
const maxAttempts = job.opts.attempts ?? 0;
7171

7272
return `id=${job.id} attempts=${currentAttempts}/${maxAttempts} age=${formated}`;
7373
}

0 commit comments

Comments
 (0)