mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-22 03:02:35 +00:00
shouldNotifyAfterCooldown previously returned true on every call when Schedule.Cooldown was 0 or negative, which the alert evaluation loop runs on every metric tick. With cooldown disabled, an active alert was re-notified on each tick. The UI labels cooldown=0 as "Disabled," so the intuitive contract is "do not re-notify," not "re-notify continuously." Treat <=0 as "first-time only": fire the initial notification, then suppress subsequent re-notifications until the alert clears or the cooldown is configured to a positive value. Level escalation re-notifications remain handled at the call site and are unaffected. Tests cover all three branches: first-time fire with cooldown=0, re-notification suppression with cooldown=0 (named regression guard for #1444), and the same behavior for negative values. |
||
|---|---|---|
| .. | ||
| alerts.go | ||
| alerts_test.go | ||
| cleanup_test.go | ||
| clone_test.go | ||
| concurrency_test.go | ||
| filter_evaluation.go | ||
| filter_evaluation_test.go | ||
| guest_disk_cleanup_test.go | ||
| guest_tags_test.go | ||
| history.go | ||
| history_concurrency_test.go | ||
| history_test.go | ||
| host_dedup_test.go | ||
| offline_toggle_test.go | ||
| per_metric_delay_example_test.go | ||
| pmg_anomaly_test.go | ||
| quiet_hours_test.go | ||
| synology_test.go | ||
| threshold_update_test.go | ||
| time_threshold_test.go | ||
| update_alerts_test.go | ||
| utility_test.go | ||