lib/aws-dev-utils/retry_wrapper.rb
def do_call m, *args, &block
      r = e = nil
      tries = 0
      while (r.nil? && tries < @max_tries) do
        begin
          r = @client.send(m, *args, &block)
        rescue Exception => e
          tries += 1
          sleep 2**tries + rand
        end
      end

      raise e unless e.nil? || r

      return r
    end
# Initialize a new RetryWrapper, internal use only
# @params client [Aws client, NextTokenWrapper, RetryWrapper]
# @param max_tries [Integer] - max number of retries
Initialize a new RetryWrapper, internal use only
Initialize a new RetryWrapper internal use only
def do_call m, *args, &block
      r = e = nil
      tries = 0
      while (r.nil? && tries < @max_tries) do
        begin
          r = @client.send(m, *args, &block)
        rescue Exception => e
          tries += 1
          sleep 2**tries + rand
        end
      end
      raise e unless e.nil? || r
      return r
    end
def do_call m , * args , & block r = e = nil tries = 0 while ( r . nil? && tries < @max_tries ) do begin r = @client . send ( m , * args , & block ) rescue Exception => e tries += 1 sleep 2 ** tries + rand end end raise e unless e . nil? || r return r end
Initialize a new RetryWrapper, internal use only
Initialize a new RetryWrapper internal use only
m
args
block
max_tries
max number of retries
max number of retries
params
client [Aws client, NextTokenWrapper, RetryWrapper]
client [ Aws client NextTokenWrapper RetryWrapper ]