diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2013-08-01 14:21:55 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2013-08-01 14:21:55 +0100 |
commit | a33d4c285812691045ad9307a44b9a00e009b2d3 (patch) | |
tree | ccecf034e044727f1a3748dcfaf59f713b6dd69f /lib/custodian | |
parent | c2e3d49000c82ec42df4d85f317658390d1f330f (diff) |
Updated the cool-off period to work after every failed test, bar the
last one.
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb index b502e1b..b9c9995 100644 --- a/lib/custodian/worker.rb +++ b/lib/custodian/worker.rb @@ -195,12 +195,12 @@ module Custodian # Some of our routers don't like being hammered. # # We delay before re-testing, but we only do this if - # we're not on the first count. + # we're not on the last count. # # The intention here is that if the test passes then there will # be no delay. If the test fails then we'll sleep. # - if ( ( @retry_delay > 0 ) && ( count != 1 ) ) + if ( ( result == false ) && ( @retry_delay > 0 ) && ( count < @retry_count ) ) log_message( "Sleeping for #{@retry_delay} seconds to allow cool-down" ) sleep( @retry_delay ) end |