lib/active_job/retry.rb in activejob-retry-0.4.2 vs lib/active_job/retry.rb in activejob-retry-0.5.0

- old
+ new

@@ -3,10 +3,11 @@ require 'active_support/core_ext' # ActiveJob uses core exts, but doesn't require it require 'active_job/retry/version' require 'active_job/retry/errors' require 'active_job/retry/constant_backoff_strategy' require 'active_job/retry/variable_backoff_strategy' +require 'active_job/retry/exponential_backoff_strategy' unless ActiveJob::Base.method_defined?(:deserialize) require 'active_job/retry/deserialize_monkey_patch' end @@ -41,9 +42,13 @@ retry_with(ConstantBackoffStrategy.new(options)) end def variable_retry(options) retry_with(VariableBackoffStrategy.new(options)) + end + + def exponential_retry(options) + retry_with(ExponentialBackoffStrategy.new(options)) end def retry_with(backoff_strategy) unless backoff_strategy_valid?(backoff_strategy) raise InvalidConfigurationError,