lib/buildmeister.rb in buildmeister-0.8.5 vs lib/buildmeister.rb in buildmeister-0.8.6

- old
+ new

@@ -242,16 +242,20 @@ end sleep notification_interval.minutes.to_i reload_info + + # Reset the retry count, since we successfully completed this iteration + retry_count = RETRY_COUNT + rescue StandardError => e if retry_count < 1 puts "Retried #{RETRY_COUNT} times... I give up!" raise e else # Exponential falloff... - sleep_time = 50 * (1 / (retry_count / 2)) + sleep_time = (50.0 * (1 / (retry_count / 2.0))).to_i puts "Caught error: #{e.class.name}: #{e.message}" puts "#{retry_count} more tries... sleeping #{sleep_time} seconds..." sleep sleep_time \ No newline at end of file