don't notify if notification state pending
If notification state is pending and last update of state was made less than a minute ago. In the case of a grafana instance is shut down/crashes between setting pending state and before sending the notification/marks as complete this logic should allow the notification to be sent after some time instead of being left in an inconsistent state where no notifications are being sent.
This commit is contained in:
@@ -93,6 +93,7 @@ type AlertNotificationState struct {
|
||||
SentAt int64
|
||||
State AlertNotificationStateType
|
||||
Version int64
|
||||
UpdatedAt int64
|
||||
}
|
||||
|
||||
type SetAlertNotificationStateToPendingCommand struct {
|
||||
@@ -110,4 +111,3 @@ type GetNotificationStateQuery struct {
|
||||
|
||||
Result *AlertNotificationState
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user