Class: Moro::Daemon
- Inherits:
-
Object
- Object
- Moro::Daemon
- Defined in:
- lib/moro/daemon.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Daemon
constructor
A new instance of Daemon.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/moro/daemon.rb', line 20 def start() ="start moro daemon" ="stop moro daemon" puts Moro.logger.info at_exit do puts Moro.logger.info end while true process_usages=@monitor.monit @handlers.each do |handler| handler.send(process_usages) end Moro.logger.info "stats memory" sleep(@interval) end end |