Class: RSpec::Hive::ExponentialBackoff

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/hive/exponential_backoff.rb

Class Method Summary collapse

Class Method Details

.retryable(tries: 5, on:) ⇒ Object



7
8
9
10
11
# File 'lib/rspec/hive/exponential_backoff.rb', line 7

def retryable(tries: 5, on:)
  Retryable.retryable(tries: tries, sleep: ->(r) { 2**r }, on: on) do
    yield
  end
end