1
0
Fork 0
mirror of https://github.com/TwiN/gatus.git synced 2024-12-14 11:58:04 +00:00

send reminder if last reminder is zero

This commit is contained in:
Jackson Sabey 2024-08-31 15:28:49 -07:00
parent f52432aa4b
commit 7e63c00bc6

View file

@ -38,7 +38,8 @@ func handleAlertsToTrigger(ep *endpoint.Endpoint, result *endpoint.Result, alert
if !ep.LastReminderSent.IsZero() {
lastReminder = time.Since(ep.LastReminderSent)
}
sendReminder := endpointAlert.Triggered && endpointAlert.RepeatInterval > 0 && lastReminder >= endpointAlert.RepeatInterval
sendReminder := endpointAlert.Triggered && endpointAlert.RepeatInterval > 0 &&
(lastReminder == 0 || lastReminder >= endpointAlert.RepeatInterval)
// If neither initial alert nor reminder needs to be sent, skip to the next alert
if !sendInitialAlert && !sendReminder {
if debug {