From 4c2c97ad23c6c2cec3ba8b12b9c7187506b67235 Mon Sep 17 00:00:00 2001 From: Dennis von der Bey <19498613+fermentfan@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:55:16 +0200 Subject: [PATCH] remove fallback date for `nextRunAt` This just creates wrong data. Old jobs that have been executed already and will not be executed again appear as jobs that will run at the current date (as their date is null). It should just be null instead like it is written in the persistence layer. No need for a fallback. --- src/job/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/job/index.ts b/src/job/index.ts index 33b4a38..3f71ef0 100644 --- a/src/job/index.ts +++ b/src/job/index.ts @@ -213,7 +213,7 @@ class Job { name: attrs.name || '', priority: attrs.priority, type: type || 'once', - nextRunAt: nextRunAt || new Date(), + nextRunAt: nextRunAt, }; }