fix(worker): handle edge cases when jobs are not delayed

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-25 09:11:54 +02:00
parent 66a49c53cf
commit ea141e99a2
7 changed files with 116 additions and 43 deletions

View File

@@ -99,7 +99,7 @@ async function start() {
logger.info('job completed', {
worker: worker.name,
data: job.data,
duration:
elapsed:
job.processedOn && job.finishedOn
? job.finishedOn - job.processedOn
: undefined,