class HTTP::Retriable::Performer

def initialize(opts)

Options Hash: (**opts)
  • :should_retry (#call) --
  • :max_delay (#to_f) --
  • :on_retry (#call) --
  • :retry_statuses (Array(#to_i)) --
  • :exceptions (Array(Exception)) --
  • :delay (#call, #to_i) --
  • :tries (#to_i) --

Parameters:
  • opts (Hash) --
def initialize(opts)
  @exception_classes = opts.fetch(:exceptions, RETRIABLE_ERRORS)
  @retry_statuses = opts[:retry_statuses]
  @tries = opts.fetch(:tries, 5).to_i
  @on_retry = opts.fetch(:on_retry, ->(*) {})
  @should_retry_proc = opts[:should_retry]
  @delay_calculator = DelayCalculator.new(opts)
end