From 9ad500d31090daf680e6760ece333a9164f653b6 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 14 May 2013 13:39:56 +0100 Subject: Allow retry-behaviour to be tweaked. We can now sleep between retesting, and we configure the number of repeats via the configuration file. --- lib/custodian/settings.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/custodian/settings.rb') diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb index b37e9e4..34a54a6 100644 --- a/lib/custodian/settings.rb +++ b/lib/custodian/settings.rb @@ -90,6 +90,26 @@ module Custodian + # + # The number of times to re-execute a test before + # considering it is failed. + # + def retries + _load() unless( _loaded? ) + + @settings['retries' ] || 5 + end + + + # + # Should we sleep before repeating tests? + # + def retry_delay + _load() unless( _loaded? ) + + @settings['retry_delay'] || 0 + end + # # The beanstalkd server address -- cgit v1.2.1