try
This commit is contained in:
parent
a70a22d436
commit
df65b00ff8
|
@ -196,9 +196,8 @@ class Admin::SitesController < OrbitAdminController
|
|||
def restart_server
|
||||
mode = Rails.env
|
||||
unicorn_rails = %x[which unicorn_rails].sub("\n",'')
|
||||
Bundler.with_clean_env{system("kill -s TERM `cat tmp/pids/unicorn.pid` && unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}")}
|
||||
sleep 2
|
||||
render :nothing => true
|
||||
Bundler.with_clean_env{system("kill -s TERM `cat tmp/pids/unicorn.pid` && unset UNICORN_FD && sleep 1 && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}")}
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -172,7 +172,7 @@ class Admin::PlaygroundController < OrbitAdminController
|
|||
def restart_unicorn(mode)
|
||||
mode = Rails.env if mode.nil?
|
||||
unicorn_rails = %x[which unicorn_rails].sub("\n",'')
|
||||
content = "kill -s TERM `cat tmp/pids/unicorn.pid` && unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode} | at now"
|
||||
content = "kill -s TERM `cat tmp/pids/unicorn.pid` && unset UNICORN_FD && sleep 1 && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode} | at now"
|
||||
Thread.new do
|
||||
Bundler.with_clean_env{system(content)}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue