Module: ActiveSaga::Backoff
- Defined in:
- lib/active_saga/backoff.rb
Class Method Summary collapse
Class Method Details
.calculate(config, attempts:) ⇒ Object
7 8 9 10 11 |
# File 'lib/active_saga/backoff.rb', line 7 def calculate(config, attempts:) normalized = (config[:strategy] || config[:backoff] || :exponential).to_sym base = base_delay(config, attempts, normalized) config[:jitter] ? apply_jitter(base) : base end |