Class: Invoker::Power::Powerup
- Inherits:
-
Object
- Object
- Invoker::Power::Powerup
- Defined in:
- lib/invoker/power/powerup.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.fork_and_start ⇒ Object
5 6 7 8 |
# File 'lib/invoker/power/powerup.rb', line 5 def self.fork_and_start powerup = new() fork { powerup.run } end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/invoker/power/powerup.rb', line 10 def run require "invoker/power/power" EM.epoll EM.run { trap("TERM") { stop } trap("INT") { stop } if Invoker.darwin? DNS.new.run(listen: DNS.server_ports) end Balancer.run } end |
#stop ⇒ Object
23 24 25 26 |
# File 'lib/invoker/power/powerup.rb', line 23 def stop Invoker::Logger.puts "Terminating Proxy/Server" EventMachine.stop end |