Sha256: ea9a940eaed2fa51ac2b68705b3ecaf7f5ffda65ebd1c3bf09b711e7bd2f559f

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

module Dynamoid
  module AdapterPlugin
    class AwsSdkV3
      module Middleware
        class Backoff
          def initialize(next_chain)
            @next_chain = next_chain
            @backoff = Dynamoid.config.backoff ? Dynamoid.config.build_backoff : nil
          end

          def call(request)
            response = @next_chain.call(request)
            @backoff.call if @backoff

            return response
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dynamoid-3.4.1 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.4.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.3.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.2.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb