diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-04-23 10:11:47 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-04-23 10:11:47 +0100 |
commit | 521970d92aa9341de76eff1086bca1bea0675665 (patch) | |
tree | e36253837ad2f3af453fe1252ab101af9b951af5 /bin/custodian-queue | |
parent | 97f6b74a74c02e8aae6ae06894445d2a8f59a545 (diff) |
Allow --queue to specify the beanstalkd tube.
Diffstat (limited to 'bin/custodian-queue')
-rwxr-xr-x | bin/custodian-queue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/custodian-queue b/bin/custodian-queue index f50a9bd..3e20410 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -69,6 +69,7 @@ if __FILE__ == $0 then # settings = Custodian::Settings.instance() $SERVER = settings.queue_server + $QUEUE = settings.queue_name begin opts = GetoptLong.new( @@ -77,6 +78,7 @@ if __FILE__ == $0 then [ "--manual", "-m", GetoptLong::NO_ARGUMENT ], [ "--monitor", "-M", GetoptLong::OPTIONAL_ARGUMENT ], [ "--server", "-S", GetoptLong::REQUIRED_ARGUMENT ], + [ "--queue", "-q", GetoptLong::REQUIRED_ARGUMENT ], [ "--stats", "-s", GetoptLong::NO_ARGUMENT ] ) opts.each do |opt, arg| @@ -93,6 +95,8 @@ if __FILE__ == $0 then $FLUSH = true when "--server" then $SERVER = arg + when "--queue" then + $QUEUE = arg when "--help" then $help = true when "--manual" then @@ -136,7 +140,7 @@ if __FILE__ == $0 then # # Create the queue object. # - queue = Beanstalk::Pool.new([$SERVER], "Custodian" ) + queue = Beanstalk::Pool.new([$SERVER], $QUEUE ) # # Alerting on a queue that is too-full? |