summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue
diff options
context:
space:
mode:
authorHazel K <acomputerdog@gmail.com>2024-10-08 10:29:03 -0400
committerHazel K <acomputerdog@gmail.com>2024-10-08 10:29:03 -0400
commitb4d10aa8f821e594ec9c907eb2a5bdb3c73c67d5 (patch)
treebf6ad5074f18c13c869b3b73e4c32fe9b08ccefc /packages/backend/src/queue
parentcondense job info (diff)
downloadsharkey-b4d10aa8f821e594ec9c907eb2a5bdb3c73c67d5.tar.gz
sharkey-b4d10aa8f821e594ec9c907eb2a5bdb3c73c67d5.tar.bz2
sharkey-b4d10aa8f821e594ec9c907eb2a5bdb3c73c67d5.zip
fix maxAttempts calculation
Diffstat (limited to 'packages/backend/src/queue')
-rw-r--r--packages/backend/src/queue/QueueProcessorService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/queue/QueueProcessorService.ts b/packages/backend/src/queue/QueueProcessorService.ts
index 8df3e09428..5ae0c738b6 100644
--- a/packages/backend/src/queue/QueueProcessorService.ts
+++ b/packages/backend/src/queue/QueueProcessorService.ts
@@ -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}`;
}