Open joel opened 6 years ago
good practices point out to using a growing delay between retries.
examples :
awesome sample
def sleep_amount(retries)
retry_index = @options.max - retries
current_interval = @options.interval * (@options.backoff_factor ** retry_index)
current_interval = [current_interval, @options.max_interval].min
random_interval = rand * @options.interval_randomness.to_f * @options.interval
current_interval + random_interval
end
Add an algorithm used to space out repeated retries