Class: Nervion::HttpWaitCalculator

Inherits:
WaitCalculator show all
Defined in:
lib/nervion/reconnection_scheduler.rb

Constant Summary collapse

MIN_WAIT =
10
MAX_WAIT =
240

Instance Method Summary collapse

Methods inherited from WaitCalculator

#wait_after

Constructor Details

#initializeHttpWaitCalculator

Returns a new instance of HttpWaitCalculator.



80
81
82
# File 'lib/nervion/reconnection_scheduler.rb', line 80

def initialize
  super(MAX_WAIT) { |error_count| MIN_WAIT * 2**(error_count - 1) }
end