lib/invoker/commander.rb in invoker-1.5.3 vs lib/invoker/commander.rb in invoker-1.5.4

- old
+ new

@@ -80,13 +80,19 @@ event.block.call end end def install_interrupt_handler - Signal.trap("INT") do + Signal.trap("INT") { + Invoker::Logger.puts("Stopping invoker") process_manager.kill_workers exit(0) - end + } + Signal.trap("TERM") { + Invoker::Logger.puts("Stopping invoker") + process_manager.kill_workers + exit(0) + } end def daemonize_app Invoker.daemon.start end