From ea62bc30350a74c8213980d3415db9d9c2d185ef Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Sat, 24 Nov 2012 14:58:37 +0000 Subject: Use the alert-factory, rather than hard-coding our mauve-alert. --- bin/custodian-dequeue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue index d535aa2..8a2dc78 100755 --- a/bin/custodian-dequeue +++ b/bin/custodian-dequeue @@ -70,10 +70,11 @@ if __FILE__ == $0 then $manual = false # - # The beanstalkd server address, and logfile. + # The beanstalkd server address, alerting method, and logfile. # settings = Custodian::Settings.instance() $SERVER = settings.queue_server + $ALERTER = settings.alerter $LOGFILE = settings.log_file begin @@ -84,6 +85,7 @@ if __FILE__ == $0 then [ "--logfile", "-l", GetoptLong::REQUIRED_ARGUMENT ], [ "--repeat", "-r", GetoptLong::REQUIRED_ARGUMENT ], [ "--server", "-S", GetoptLong::REQUIRED_ARGUMENT ], + [ "--alerter", "-a", GetoptLong::REQUIRED_ARGUMENT ], [ "--single", "-s", GetoptLong::NO_ARGUMENT ], [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ] ) @@ -97,6 +99,8 @@ if __FILE__ == $0 then ENV["REPEAT"] = arg when "--server" then $SERVER = arg + when "--alerter" then + $ALERTER = arg when "--single" then ENV["SINGLE"] = "1" when "--fail" then @@ -146,7 +150,7 @@ if __FILE__ == $0 then # # Create the object # - worker = Custodian::Worker.new( $SERVER, $LOGFILE ) + worker = Custodian::Worker.new( $SERVER, $ALERTER, $LOGFILE ) # -- cgit v1.2.1