Class: Bosh::Monitor::ApiController

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/bosh/monitor/api_controller.rb

Constant Summary collapse

PULSE_TIMEOUT =
180

Instance Method Summary collapse

Constructor Details

#initializeApiController

Returns a new instance of ApiController.



5
6
7
8
9
10
11
12
13
# File 'lib/bosh/monitor/api_controller.rb', line 5

def initialize
  @heartbeat = Time.now

  EM.add_periodic_timer(1) do
    EM.defer { @heartbeat = Time.now }
  end

  super
end