fix NotifyRecovered logic

This commit is contained in:
Ulric Qin 2022-04-01 15:20:52 +08:00
parent db15eaab04
commit 9e8d9b44b1
1 changed files with 7 additions and 4 deletions

View File

@ -44,11 +44,14 @@ func consume(events []interface{}, sema *semaphore.Semaphore) {
func consumeOne(event *models.AlertCurEvent) {
logEvent(event, "consume")
persist(event)
if event.NotifyRecovered == 1 {
fillUsers(event)
callback(event)
notify(event)
if event.IsRecovered && event.NotifyRecovered == 0 {
return
}
fillUsers(event)
callback(event)
notify(event)
}
func persist(event *models.AlertCurEvent) {