forked from saurabh/orbit4-5
update manager fix
This commit is contained in:
parent
4b13800007
commit
0526b5f9e7
|
@ -105,7 +105,8 @@ class Admin::SitesController < OrbitAdminController
|
|||
result = "failed"
|
||||
else
|
||||
result = "success"
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && bundle install` }
|
||||
p1 = fork { bundle_install }
|
||||
Process.detach(p1)
|
||||
end
|
||||
|
||||
render :text => result
|
||||
|
@ -114,6 +115,13 @@ class Admin::SitesController < OrbitAdminController
|
|||
end
|
||||
end
|
||||
|
||||
def bundle_install
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && bundle install` }
|
||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||
sleep 5
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
def restart_server
|
||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||
sleep 5
|
||||
|
|
Loading…
Reference in New Issue