Skip to content

Commit

Permalink
Only send periodic warnings for stuff with a planned end date, i.e., …
Browse files Browse the repository at this point in the history
…VICE jobs
  • Loading branch information
ianmcorvidae committed Sep 23, 2024
1 parent 83a5527 commit d10cf30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions analyses.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ SELECT jobs.id,
JOIN users on jobs.user_id = users.id
LEFT join notif_statuses ON jobs.id = notif_statuses.analysis_id
WHERE jobs.status = $1
AND jobs.planned_end_date > now()
AND (notif_statuses.last_periodic_warning is null
OR notif_statuses.last_periodic_warning < now() - coalesce(notif_statuses.periodic_warning_period, '4 hours'::interval))
`
Expand Down

0 comments on commit d10cf30

Please sign in to comment.