diff options
| author | Steve Kemp <steve@steve.org.uk> | 2012-11-18 18:37:52 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2012-11-18 18:37:52 +0000 | 
| commit | 49ef9b1e49a0f2b53a97afbacb0bed0f20b1fab1 (patch) | |
| tree | c2c077397a917963390db8629e04411e66e21d17 /lib | |
| parent | 3335f9936fa1aa700ca634e32c3178743bcb2f74 (diff) | |
  Added --fail flag.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/custodian.rb | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/lib/custodian.rb b/lib/custodian.rb index 6c0ec81..fec928b 100644 --- a/lib/custodian.rb +++ b/lib/custodian.rb @@ -104,6 +104,8 @@ class Custodian    #    def process_single_job +    result = false +      begin        job = @queue.reserve() @@ -200,6 +202,7 @@ class Custodian            log_message( "Test succeeed - clearing alert" )            success = true            alert.clear() +          result = true          end          count += 1        end @@ -228,7 +231,20 @@ class Custodian        log_message( "Job ID : #{job.id} - Removed" )        job.delete if ( job )      end + +    return result    end + + +  # +  #  Process jobs until we see a failure - stop then. +  # +  def process_until_fail +      while( process_single_job() ) +          # nop +      end +  end +  end | 
