From 4d60ea8d715c419b88a1cb85fc4a3584fe09f14b Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Tue, 7 Mar 2023 12:56:34 +0200 Subject: [PATCH] fix: use job's delay attribute to reflect changes in delay (via `changeDelay`), closes #544 --- packages/api/src/handlers/queues.ts | 2 +- packages/api/typings/app.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api/src/handlers/queues.ts b/packages/api/src/handlers/queues.ts index a1b6d799..13e6fcec 100644 --- a/packages/api/src/handlers/queues.ts +++ b/packages/api/src/handlers/queues.ts @@ -24,7 +24,7 @@ const formatJob = (job: QueueJob, queue: BaseAdapter): AppJob => { finishedOn: jobProps.finishedOn, progress: jobProps.progress, attempts: jobProps.attemptsMade, - delay: job.opts.delay, + delay: jobProps.delay, failedReason: jobProps.failedReason, stacktrace, opts: jobProps.opts, diff --git a/packages/api/typings/app.ts b/packages/api/typings/app.ts index 627a2e7f..5a1bff75 100644 --- a/packages/api/typings/app.ts +++ b/packages/api/typings/app.ts @@ -44,6 +44,7 @@ export interface QueueJobJson { attemptsMade: number; finishedOn?: number | null; processedOn?: number | null; + delay?: number; timestamp: number; failedReason: string; stacktrace: string[] | null;