summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-24 14:58:37 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-24 14:58:37 +0000
commitea62bc30350a74c8213980d3415db9d9c2d185ef (patch)
treeecf32636a7d464cc018d8e674d2ee103accd93ab /bin
parent4444995b23c818ead1bfbd18dff2c5be202a518b (diff)
Use the alert-factory, rather than hard-coding our mauve-alert.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/custodian-dequeue8
1 files changed, 6 insertions, 2 deletions
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 )
#