Top Level Namespace

Defined Under Namespace

Modules: ActiveJob

Instance Method Summary collapse

Instance Method Details

#choose_strategy(strategy, options) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/active_job/retry.rb', line 14

def choose_strategy(strategy, options)
  case strategy
  when :constant    then ActiveJob::Retry::ConstantBackoffStrategy.new(options)
  when :variable    then ActiveJob::Retry::VariableBackoffStrategy.new(options)
  when :exponential then ActiveJob::Retry::ExponentialBackoffStrategy.new(options)
  else strategy
  end
end