Sha256: 39c4d910f54c88810bd6b7a69ed96b082d13b71ff51597a64a17ea384b19a3bc

Contents?: true

Size: 513 Bytes

Versions: 6

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

module Dynamoid
  # @private
  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

            response
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dynamoid-3.10.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.9.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.8.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.7.1 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.7.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
dynamoid-3.6.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb