Skip to content

Commit

Permalink
remove fallback date for nextRunAt
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fermentfan authored Oct 10, 2024
1 parent b04171d commit 4c2c97a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/job/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class Job<T extends JobAttributesData = JobAttributesData> {
name: attrs.name || '',
priority: attrs.priority,
type: type || 'once',
nextRunAt: nextRunAt || new Date(),
nextRunAt: nextRunAt,
};
}

Expand Down

0 comments on commit 4c2c97a

Please sign in to comment.