mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
alerting: dedupe alert notifications when running multiple servers
alert notifications will only be sent if the database value is updated. ref #6957
This commit is contained in:
@@ -240,6 +240,10 @@ func SetAlertState(cmd *m.SetAlertStateCommand) error {
|
||||
return m.ErrCannotChangeStateOnPausedAlert
|
||||
}
|
||||
|
||||
if alert.State == cmd.State {
|
||||
return m.ErrRequiresNewState
|
||||
}
|
||||
|
||||
alert.State = cmd.State
|
||||
alert.StateChanges += 1
|
||||
alert.NewStateDate = time.Now()
|
||||
|
||||
Reference in New Issue
Block a user