Method: Klomp::Sentinel#run

Defined in:
lib/klomp/sentinel.rb

#runObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/klomp/sentinel.rb', line 8

def run
  fib_state = [0, 1]
  loop do
    begin
      @connection.reconnect
      break
    rescue
      sleep fib_state[1]
      fib_state = [fib_state[1], fib_state[0]+fib_state[1]]
    end
  end
end