Module: Populus::Daemon
- Defined in:
- lib/populus/daemon.rb
Class Method Summary collapse
Class Method Details
.run(setting: nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/populus/daemon.rb', line 6 def self.run(setting: nil) raise ArgumentError unless setting Populus.eval_setting(setting) threads = Populus::Pool.gen_threads trap(:INT) do STDERR.puts "Caught SIGINT. Quitting..." threads.each(&:kill) end threads.each(&:join) Populus.logger.warn "Consul process exited. Aborting..." end |