summaryrefslogtreecommitdiff
path: root/bin/custodian-dequeue
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-01-19 12:27:15 +0000
committerSteve Kemp <steve@steve.org.uk>2015-01-19 12:27:15 +0000
commit7d90bf7fba34d586c25ed096b8a2fc0fdf311879 (patch)
tree006a0737b075effa6b526bd3ff96a3b30167aa54 /bin/custodian-dequeue
parentca9be00dc45d0a71210ad16423d6d319c87b6727 (diff)
Updated to use our queue-abstraction.
This means we can queue/dequeue to either Redis or Beanstalkd.
Diffstat (limited to 'bin/custodian-dequeue')
-rwxr-xr-xbin/custodian-dequeue7
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue
index 3072fbd..7a99186 100755
--- a/bin/custodian-dequeue
+++ b/bin/custodian-dequeue
@@ -53,6 +53,7 @@ require 'getoptlong'
# Our code.
#
require 'custodian/settings'
+require 'custodian/queue'
require 'custodian/worker'
@@ -71,7 +72,6 @@ if __FILE__ == $0 then
#
settings = Custodian::Settings.instance()
$SERVER = settings.queue_server
- $QUEUE = settings.queue_name
$ALERTER = settings.alerter
$LOGFILE = settings.log_file
@@ -82,7 +82,6 @@ if __FILE__ == $0 then
[ "--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 ],
@@ -96,8 +95,6 @@ if __FILE__ == $0 then
$LOGFILE = arg
when "--server" then
$SERVER = arg
- when "--queue" then
- $QUEUE = arg
when "--alerter" then
$ALERTER = arg
when "--single" then
@@ -149,7 +146,7 @@ if __FILE__ == $0 then
#
# Create the object
#
- worker = Custodian::Worker.new( $SERVER, $QUEUE, $ALERTER, $LOGFILE, settings )
+ worker = Custodian::Worker.new( $SERVER, $ALERTER, $LOGFILE, settings )
#