summaryrefslogtreecommitdiff
path: root/bin/custodian-queue
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-01-21 16:49:43 +0000
committerSteve Kemp <steve@steve.org.uk>2015-01-21 16:49:43 +0000
commit27d73e3f891e4ccfde3a50f341ded666823b1cdc (patch)
treeb2c119b8ce840036ab9ead9e369261075e4f8a71 /bin/custodian-queue
parent86f75da34a07ac84916f870a5901559500af8235 (diff)
Don't hard-wire redis as the queue-type.
Read it from the configuration-file and don't expose the server flag which is now bogus.
Diffstat (limited to 'bin/custodian-queue')
-rwxr-xr-xbin/custodian-queue14
1 files changed, 2 insertions, 12 deletions
diff --git a/bin/custodian-queue b/bin/custodian-queue
index 23f3841..0545df7 100755
--- a/bin/custodian-queue
+++ b/bin/custodian-queue
@@ -9,7 +9,6 @@
# [ -M | --monitor ]
# [ -f | --flush ]
# [ -s | --stats ]
-# [ -S | --server 1.2.3.4:123 ]
#
# OPTIONS
#
@@ -23,8 +22,6 @@
#
# -s, --stats Show the count of pending jobs.
#
-# -S, --server Specify the host:port for the beanstalkd queue.
-#
#
# ABOUT
#
@@ -63,11 +60,6 @@ if __FILE__ == $0 then
$manual = false
$MONITOR = nil
- #
- # The beanstalkd server address.
- #
- settings = Custodian::Settings.instance()
- $SERVER = settings.queue_server
begin
opts = GetoptLong.new(
@@ -75,7 +67,6 @@ if __FILE__ == $0 then
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--manual", "-m", GetoptLong::NO_ARGUMENT ],
[ "--monitor", "-M", GetoptLong::OPTIONAL_ARGUMENT ],
- [ "--server", "-S", GetoptLong::REQUIRED_ARGUMENT ],
[ "--stats", "-s", GetoptLong::NO_ARGUMENT ]
)
opts.each do |opt, arg|
@@ -90,8 +81,6 @@ if __FILE__ == $0 then
$STATS = true
when "--flush" then
$FLUSH = true
- when "--server" then
- $SERVER = arg
when "--help" then
$help = true
when "--manual" then
@@ -135,7 +124,8 @@ if __FILE__ == $0 then
#
# Create the queue object.
#
- queue = Custodian::QueueType.create( "redis" )
+ settings = Custodian::Settings.instance()
+ queue = Custodian::QueueType.create( settings.queue_type() )
#
# Alerting on a queue that is too-full?