Sha256: e0a122b6a6ca3026936602723bf3fde060f62bbb0c06405ad9e7bae0c4244065

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 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

            response
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dynamoid-3.5.0 lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb