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.11.4 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.11.3 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.11.2 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.11.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.11.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.10.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.10.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.8 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.7 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.6 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.5 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.4 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.3 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.2 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.9.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.8.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.7.0 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.6.1 lib/cc/service/invocation/with_retries.rb
codeclimate-services-1.6.0 lib/cc/service/invocation/with_retries.rb