Class: ActiveWorkflow::Stores::ActiveRecord::Backoff
- Inherits:
-
Object
- Object
- ActiveWorkflow::Stores::ActiveRecord::Backoff
- Defined in:
- lib/active_workflow/stores/active_record.rb
Class Method Summary collapse
Class Method Details
.calculate(config, attempts:) ⇒ Object
663 664 665 666 667 |
# File 'lib/active_workflow/stores/active_record.rb', line 663 def calculate(config, attempts:) strategy = (config[:strategy] || config[:backoff] || :exponential).to_sym base = base_delay(config, attempts, strategy) config[:jitter] ? apply_jitter(base) : base end |