Sha256: 5be36fc17c1ec1bb8715eb94f00f96656400065190561434c2105c04e8f134f9

Contents?: true

Size: 315 Bytes

Versions: 4

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

require 'retryable'

module RSpec
  module Hive
    class ExponentialBackoff
      class << self
        def retryable(tries: 5, on:)
          Retryable.retryable(tries: tries, sleep: ->(r) { 2**r }, on: on) do
            yield
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-hive-0.6.3 lib/rspec/hive/exponential_backoff.rb
rspec-hive-0.6.2 lib/rspec/hive/exponential_backoff.rb
rspec-hive-0.6.1 lib/rspec/hive/exponential_backoff.rb
rspec-hive-0.6.0 lib/rspec/hive/exponential_backoff.rb