Sha256: 48355993c757235f57104369f1a2edd22a7a359fdadaf52faf841e01d790a919

Contents?: true

Size: 292 Bytes

Versions: 38

Compression:

Stored size: 292 Bytes

Contents

class CC::Service::Invocation
  class WithRetries
    def initialize(invocation, retries)
      @invocation = invocation
      @retries = retries
    end

    def call
      @invocation.call
    rescue => ex
      raise ex if @retries.zero?

      @retries -= 1
      retry
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
codeclimate-services-1.5.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.5.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.4.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.3.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.2.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.1.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.0.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.0.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.6.2 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.6.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.6.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.5.3 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.5.2 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.5.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.5.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.4.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.4.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-0.3.0 lib/cc/service/invocation/with_retries.rb