Class: Flamingo::Daemon::DispatcherProcess
- Inherits:
-
ChildProcess
- Object
- ChildProcess
- Flamingo::Daemon::DispatcherProcess
- Defined in:
- lib/flamingo/daemon/dispatcher_process.rb
Instance Attribute Summary
Attributes inherited from ChildProcess
Instance Method Summary collapse
Methods inherited from ChildProcess
Methods included from TrapKeeper
Instance Method Details
#register_signal_handlers ⇒ Object
17 18 19 20 |
# File 'lib/flamingo/daemon/dispatcher_process.rb', line 17 def register_signal_handlers trap("INT") { stop } trap("TERM") { stop } end |
#run ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/flamingo/daemon/dispatcher_process.rb', line 5 def run register_signal_handlers $0 = "flamingod-dispatcher" @dispatcher = Flamingo::Dispatcher.new Flamingo.logger.info "Starting dispatcher on pid=#{Process.pid} under pid=#{Process.ppid}" @dispatcher.run end |
#stop ⇒ Object
13 14 15 |
# File 'lib/flamingo/daemon/dispatcher_process.rb', line 13 def stop @dispatcher.stop end |