generators/unicorn.rb.erb in ricodigo-capistrano-recipes-0.1.5 vs generators/unicorn.rb.erb in ricodigo-capistrano-recipes-0.1.6
- old
+ new
@@ -27,12 +27,11 @@
before_fork do |server, worker|
if File.exists?(old_pid) && server.pid != old_pid
pid = File.read(old_pid).to_i
begin
+ puts ">> Killing old unicorn process"
Process.kill("QUIT", pid)
- Process.kill(0, pid)
- Process.wait
rescue Errno::ECHILD, Errno::ESRCH => e
$stderr.puts ">> Process #{pid} has stopped"
rescue Errno::ENOENT => e
$stderr.puts ">> Error killing previous instance. #{e.message}"
# someone else did our job for us