Sha256: 78dd20ed930e1c420a63ae7812815005f9953da8853acb2ca6a452f58b9d3ee5

Contents?: true

Size: 780 Bytes

Versions: 83

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

module Aws
  module DynamoDB
    module Plugins
      class ExtendedRetries < Seahorse::Client::Plugin

        option(:retry_limit,
          default: 10,
          required: false,
          doc_type: Integer,
          docstring: <<-DOCS)
The maximum number of times to retry failed requests.  Only
~ 500 level server errors and certain ~ 400 level client errors
are retried.  Generally, these are throttling errors, data
checksum errors, networking errors, timeout errors and auth
errors from expired credentials.
          DOCS

        option(:retry_backoff, default: lambda { |context|
          if context.retries > 1
            Kernel.sleep(50 * (2 ** (context.retries - 1)) / 1000.0)
          end
        })

      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
aws-sdk-dynamodb-1.134.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.133.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.132.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.131.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.130.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.129.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.128.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.127.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.126.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.125.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.124.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.123.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.122.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.121.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.120.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.119.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.118.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.117.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.116.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb
aws-sdk-dynamodb-1.115.0 lib/aws-sdk-dynamodb/plugins/extended_retries.rb