mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Revert changes post code review and move them to notification page
This commit is contained in:
@@ -66,7 +66,17 @@ func (n *notificationService) sendNotifications(context *EvalContext, notifiers
|
||||
not := notifier //avoid updating scope variable in go routine
|
||||
n.log.Debug("Sending notification", "type", not.GetType(), "id", not.GetNotifierId(), "isDefault", not.GetIsDefault())
|
||||
metrics.M_Alerting_Notification_Sent.WithLabelValues(not.GetType()).Inc()
|
||||
g.Go(func() error { return not.Notify(context) })
|
||||
g.Go(func() error {
|
||||
success := not.Notify(context) == nil
|
||||
cmd := &m.RecordNotificationJournalCommand{
|
||||
OrgId: context.Rule.OrgId,
|
||||
AlertId: context.Rule.Id,
|
||||
NotifierId: not.GetNotifierId(),
|
||||
SentAt: time.Now(),
|
||||
Success: success,
|
||||
}
|
||||
return bus.Dispatch(cmd)
|
||||
})
|
||||
}
|
||||
|
||||
return g.Wait()
|
||||
|
||||
Reference in New Issue
Block a user