summaryrefslogtreecommitdiff
path: root/bin/custodian-queue
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
commit5dc1462a4ce536cacf9fc380b1022d1c48d12bc2 (patch)
tree8d223dfd32d36d95512f831a6ddc03c33879f384 /bin/custodian-queue
parent2ee023e6a37631ca4bedf6b6a4341b75e7bd907c (diff)
Allow --queue to specify the beanstalkd tube.
Diffstat (limited to 'bin/custodian-queue')
-rwxr-xr-xbin/custodian-queue6
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?