summaryrefslogtreecommitdiff
path: root/bin/custodian-dequeue
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-04-23 10:11:47 +0100
committerSteve Kemp <steve@steve.org.uk>2013-04-23 10:11:47 +0100
commit521970d92aa9341de76eff1086bca1bea0675665 (patch)
treee36253837ad2f3af453fe1252ab101af9b951af5 /bin/custodian-dequeue
parent97f6b74a74c02e8aae6ae06894445d2a8f59a545 (diff)
Allow --queue to specify the beanstalkd tube.
Diffstat (limited to 'bin/custodian-dequeue')
-rwxr-xr-xbin/custodian-dequeue7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue
index 08579af..f121686 100755
--- a/bin/custodian-dequeue
+++ b/bin/custodian-dequeue
@@ -71,15 +71,18 @@ if __FILE__ == $0 then
#
settings = Custodian::Settings.instance()
$SERVER = settings.queue_server
+ $QUEUE = settings.queue_name
$ALERTER = settings.alerter
$LOGFILE = settings.log_file
+
begin
opts = GetoptLong.new(
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--manual", "-m", GetoptLong::NO_ARGUMENT ],
[ "--fail", "-f", GetoptLong::NO_ARGUMENT ],
[ "--logfile", "-l", GetoptLong::REQUIRED_ARGUMENT ],
+ [ "--queue", "-q", GetoptLong::REQUIRED_ARGUMENT ],
[ "--server", "-S", GetoptLong::REQUIRED_ARGUMENT ],
[ "--alerter", "-a", GetoptLong::REQUIRED_ARGUMENT ],
[ "--single", "-s", GetoptLong::NO_ARGUMENT ],
@@ -93,6 +96,8 @@ if __FILE__ == $0 then
$LOGFILE = arg
when "--server" then
$SERVER = arg
+ when "--queue" then
+ $QUEUE = arg
when "--alerter" then
$ALERTER = arg
when "--single" then
@@ -144,7 +149,7 @@ if __FILE__ == $0 then
#
# Create the object
#
- worker = Custodian::Worker.new( $SERVER, $ALERTER, $LOGFILE, settings )
+ worker = Custodian::Worker.new( $SERVER, $QUEUE, $ALERTER, $LOGFILE, settings )
#