Class: Nodectl::Watchdog
- Inherits:
-
Object
- Object
- Nodectl::Watchdog
- Defined in:
- lib/nodectl/watchdog.rb
Constant Summary collapse
- TICK_INTERVAL =
2
Instance Method Summary collapse
-
#initialize ⇒ Watchdog
constructor
A new instance of Watchdog.
- #tick ⇒ Object
Constructor Details
#initialize ⇒ Watchdog
Returns a new instance of Watchdog.
4 5 6 |
# File 'lib/nodectl/watchdog.rb', line 4 def initialize @timer = EM.add_periodic_timer(TICK_INTERVAL, method(:tick)) end |