Class: AsyncObserver::DaemonizerHandler
- Inherits:
-
Daemonizer::Handler
- Object
- Daemonizer::Handler
- AsyncObserver::DaemonizerHandler
- Defined in:
- lib/async_observer/daemonizer_handler.rb
Instance Method Summary collapse
Instance Method Details
#prepare(block) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/async_observer/daemonizer_handler.rb', line 3 def prepare(block) logger.info "Loading Rails" require File.join(Daemonizer.root, '/config/environment') require 'async_observer/worker' logger.info "Rails loaded" super end |
#start ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/async_observer/daemonizer_handler.rb', line 11 def start logger.info "Starting cycle" Worker.new(binding, :tube => option(:tube), :servers => option(:servers), :worker_id => worker_id, :workers_count => workers_count).run logger.info "Ending cycle" end |