summaryrefslogtreecommitdiff
path: root/bin/custodian-queue
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-23 14:57:52 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-23 14:57:52 +0000
commitb56f5f1bf71e8d9c773fe9bc4ff6426308e7ef1a (patch)
tree9192c3b8c97179d50776854be8741bbbfd09f28b /bin/custodian-queue
parent70a5bc6c9b887ee3082d03eabf935fadb6bdaf7b (diff)
Read the server address:port from the settings object. Along with the filename
if appropriate for logging.
Diffstat (limited to 'bin/custodian-queue')
-rwxr-xr-xbin/custodian-queue15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/custodian-queue b/bin/custodian-queue
index e75b5cc..cb4c3ce 100755
--- a/bin/custodian-queue
+++ b/bin/custodian-queue
@@ -38,10 +38,18 @@
+#
+# Standard modules
+#
require 'beanstalk-client'
require 'getoptlong'
+#
+# Our code
+#
+require 'custodian/settings'
+
#
@@ -49,13 +57,18 @@ require 'getoptlong'
#
if __FILE__ == $0 then
- $SERVER = "127.0.0.1:11300"
$FLUSH = false
$STATS = false
$help = false
$manual = false
$MONITOR = false
+ #
+ # The beanstalkd server address.
+ #
+ settings = Custodian::Settings.instance()
+ $SERVER = settings.queue_server
+
begin
opts = GetoptLong.new(
[ "--flush", "-f", GetoptLong::NO_ARGUMENT ],