Class: Heartbeat
- Inherits:
-
Object
- Object
- Heartbeat
- Defined in:
- lib/heartbeat.rb
Instance Method Summary collapse
-
#initialize ⇒ Heartbeat
constructor
A new instance of Heartbeat.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Heartbeat
Returns a new instance of Heartbeat.
7 8 9 10 11 12 |
# File 'lib/heartbeat.rb', line 7 def initialize @logger = Logger.new("log/heartbeat.log") @logger.debug "Heartbeat#initialize : Connecting to AMQP server" @conn = Bunny.new(:logging => true) @conn.start end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 |
# File 'lib/heartbeat.rb', line 14 def run EM.run do start_amqp_heartbeat end end |