mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
fix maxAttempts calculation
This commit is contained in:
parent
786702e076
commit
b4d10aa8f8
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ function getJobInfo(job: Bull.Job | undefined, increment = false): string {
|
||||||
|
|
||||||
// onActiveとかonCompletedのattemptsMadeがなぜか0始まりなのでインクリメントする
|
// onActiveとかonCompletedのattemptsMadeがなぜか0始まりなのでインクリメントする
|
||||||
const currentAttempts = job.attemptsMade + (increment ? 1 : 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}`;
|
return `id=${job.id} attempts=${currentAttempts}/${maxAttempts} age=${formated}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue