4 # This condition degrades its interval by a factor of two for 3 tries before failing
5 class DegradingLambda < PollCondition
15 valid &= complain("You must specify the 'lambda' attribute for :degrading_lambda") if self.lambda.nil?
20 puts "Calling test. Interval at #{self.interval}"
21 @original_interval ||= self.interval
23 return true if @tries == 2
24 self.interval = self.interval / 2.0
28 self.interval = @original_interval
37 Timeout::timeout(@interval) {