diff options
| author | Steve Kemp <steve@steve.org.uk> | 2012-11-24 14:58:37 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2012-11-24 14:58:37 +0000 | 
| commit | 8aad70a42ec6c963a1f306d3ff8899d8aa402db8 (patch) | |
| tree | ecf32636a7d464cc018d8e674d2ee103accd93ab /bin | |
| parent | de3c2b4da2162298e8d016e8c847b190d53d12fa (diff) | |
  Use the alert-factory, rather than hard-coding our mauve-alert.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/custodian-dequeue | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue index d535aa2..8a2dc78 100755 --- a/bin/custodian-dequeue +++ b/bin/custodian-dequeue @@ -70,10 +70,11 @@ if __FILE__ == $0 then    $manual  = false    # -  #  The beanstalkd server address, and logfile. +  #  The beanstalkd server address, alerting method, and logfile.    #    settings = Custodian::Settings.instance()    $SERVER  = settings.queue_server +  $ALERTER = settings.alerter    $LOGFILE = settings.log_file    begin @@ -84,6 +85,7 @@ if __FILE__ == $0 then                            [ "--logfile", "-l", GetoptLong::REQUIRED_ARGUMENT ],                            [ "--repeat",  "-r", GetoptLong::REQUIRED_ARGUMENT ],                            [ "--server",  "-S", GetoptLong::REQUIRED_ARGUMENT ], +                          [ "--alerter", "-a", GetoptLong::REQUIRED_ARGUMENT ],                            [ "--single",  "-s", GetoptLong::NO_ARGUMENT ],                            [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ]                            ) @@ -97,6 +99,8 @@ if __FILE__ == $0 then            ENV["REPEAT"] = arg        when "--server" then            $SERVER = arg +      when "--alerter" then +          $ALERTER = arg        when "--single" then            ENV["SINGLE"] = "1"        when "--fail" then @@ -146,7 +150,7 @@ if __FILE__ == $0 then    #    #  Create the object    # -  worker = Custodian::Worker.new( $SERVER, $LOGFILE ) +  worker = Custodian::Worker.new( $SERVER, $ALERTER, $LOGFILE )    # | 
