Skip to content

Commit

Permalink
fix maxAttempts calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
warriordog committed Oct 8, 2024
1 parent 786702e commit b4d10aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/queue/QueueProcessorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function getJobInfo(job: Bull.Job | undefined, increment = false): string {

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

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

0 comments on commit b4d10aa

Please sign in to comment.