Method: Elasticity::Looper#go
- Defined in:
- lib/elasticity/looper.rb
#go ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/elasticity/looper.rb', line 11 def go start_time = Time.now loop do should_continue, *results = @on_retry_check.call return unless should_continue @on_wait.call(Time.now - start_time, *results) if @on_wait sleep(@poll_interval) end end |