aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-21 14:32:09 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-21 14:32:09 +0000
commit068fc107d22a0438afb53a82e7dab680b721531c (patch)
treeb8e443a3d444646737a1a87a61363798c87e3b43 /lib/mauve
parent168f0246efa678b87fe531c0e5406df962dff6ca (diff)
The notifier now saves the alert following notification. This should
ensure that the cached group gets updated.
Diffstat (limited to 'lib/mauve')
-rw-r--r--lib/mauve/notifier.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb
index 2e3ac89..67cd89b 100644
--- a/lib/mauve/notifier.rb
+++ b/lib/mauve/notifier.rb
@@ -36,10 +36,12 @@ module Mauve
# This sends the notification for an alert
#
def notify(alert, at)
+ alert.reload
if alert.alert_group.nil?
logger.warn "Could not notify for #{alert} since there are no matching alert groups"
else
alert.alert_group.notify(alert, at)
+ alert.save if alert.is_a?(Alert)
end
end