Top Level Namespace

Defined Under Namespace

Modules: Diffend

Instance Method Summary collapse

Instance Method Details

#exponential_backoff(retry_count) ⇒ Float

Calculate exponential backoff

Parameters:

  • retry_count (Integer)

Returns:

  • (Float)

    backoff value



34
35
36
# File 'lib/diffend/monitor.rb', line 34

def exponential_backoff(retry_count)
  (0.25 * 1.5**retry_count.to_f).round(2)
end