Module: CMDx::Retriers::Exponential Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Exponential backoff. Doubles the base delay every attempt: ‘delay * (2 ** attempt)`.
Instance Method Summary collapse
-
#call(attempt, delay, _prev_delay = nil) ⇒ Float
private
Computed delay.
Instance Method Details
#call(attempt, delay, _prev_delay = nil) ⇒ Float
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns computed delay.
17 18 19 |
# File 'lib/cmdx/retriers/exponential.rb', line 17 def call(attempt, delay, _prev_delay = nil) delay * (2**attempt) end |