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:
parent
f52432aa4b
commit
7e63c00bc6
1 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue