Class: EventHub::ActorWatchdog
- Inherits:
-
Object
- Object
- EventHub::ActorWatchdog
- Includes:
- Celluloid, Helper
- Defined in:
- lib/eventhub/actor_watchdog.rb
Overview
Watchdog class
Instance Method Summary collapse
- #cleanup ⇒ Object
-
#initialize ⇒ ActorWatchdog
constructor
A new instance of ActorWatchdog.
- #start ⇒ Object
Methods included from Helper
#bunny_connection_properties, #get_name_from_class, #now_stamp
Constructor Details
#initialize ⇒ ActorWatchdog
Returns a new instance of ActorWatchdog.
9 10 11 |
# File 'lib/eventhub/actor_watchdog.rb', line 9 def initialize async.start end |
Instance Method Details
#cleanup ⇒ Object
21 22 23 |
# File 'lib/eventhub/actor_watchdog.rb', line 21 def cleanup EventHub.logger.info('Watchdog is cleanig up...') end |
#start ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/eventhub/actor_watchdog.rb', line 13 def start loop do EventHub.logger.info('Running watchdog...') watch sleep Configuration.processor[:watchdog_cycle_in_s] end end |