summaryrefslogtreecommitdiff
path: root/lib/custodian/worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/worker.rb')
-rw-r--r--lib/custodian/worker.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb
index 57c55f7..79dab1e 100644
--- a/lib/custodian/worker.rb
+++ b/lib/custodian/worker.rb
@@ -213,9 +213,14 @@ module Custodian
#
def do_raise( test )
@alerter.split( "," ).each do |alerter|
+
log_message( "Creating alerter: #{alerter}" )
alert = Custodian::AlertFactory.create( alerter, test )
- alert.set_target( Custodian::Settings.instance().alerter_target() )
+
+ target = Custodian::Settings.instance().alerter_target( alerter )
+ puts "Target for alert is #{target}"
+
+ alert.set_target( target )
alert.raise()
end
end
@@ -228,7 +233,11 @@ module Custodian
@alerter.split( "," ).each do |alerter|
log_message( "Creating alerter: #{alerter}" )
alert = Custodian::AlertFactory.create( alerter, test )
- alert.set_target( Custodian::Settings.instance().alerter_target() )
+
+ target = Custodian::Settings.instance().alerter_target( alerter )
+ puts "Target for alert is #{target}"
+
+ alert.set_target( target )
alert.clear()
end
end