Skip to content

Commit

Permalink
Ensure planned end dates when checking periodic warnings (job kill wa…
Browse files Browse the repository at this point in the history
…rnings depend on it already being set)
  • Loading branch information
ianmcorvidae committed Sep 18, 2024
1 parent 3293548 commit 27cfee5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ func sendPeriodic(ctx context.Context, db *sql.DB, vicedb *VICEDatabaser) {
periodDuration time.Duration
)

if err = EnsurePlannedEndDate(ctx, db, &j); err != nil {
log.Error(errors.Wrapf(err, "Error ensuring a planned end date for job %s", j.ID))
}

// fetch preferences and update in the DB if needed
if err = ensureNotifRecord(ctx, vicedb, j); err != nil {
log.Error(err)
Expand Down

0 comments on commit 27cfee5

Please sign in to comment.