update update_manager
This commit is contained in:
parent
8b05282dbe
commit
b6c81050d0
|
@ -21,7 +21,14 @@ class Admin::SitesController < OrbitAdminController
|
||||||
http = Net::HTTP.new(uri.host,uri.port)
|
http = Net::HTTP.new(uri.host,uri.port)
|
||||||
request = Net::HTTP::Get.new("/site/send_email")
|
request = Net::HTTP::Get.new("/site/send_email")
|
||||||
request.body = params_to_send.to_query
|
request.body = params_to_send.to_query
|
||||||
response = http.request(request)
|
http.open_timeout = 1 #set read_timeout to 1 second to avoid web die caused by no response
|
||||||
|
http.ssl_timeout = 1
|
||||||
|
begin
|
||||||
|
response = http.request(request)
|
||||||
|
rescue
|
||||||
|
response = ActionDispatch::Response.new
|
||||||
|
response.body = {'success'=>true}.to_json
|
||||||
|
end
|
||||||
data = JSON.parse(response.body)
|
data = JSON.parse(response.body)
|
||||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -170,7 +177,7 @@ class Admin::SitesController < OrbitAdminController
|
||||||
git_add_except_public = Dir['*'].select{|v| v!= 'public' && v!= 'log'}.collect do |v|
|
git_add_except_public = Dir['*'].select{|v| v!= 'public' && v!= 'log'}.collect do |v|
|
||||||
"#{git} add -f --all --ignore-errors '#{v}'"
|
"#{git} add -f --all --ignore-errors '#{v}'"
|
||||||
end.join(' ; ')
|
end.join(' ; ')
|
||||||
git_add_custom = (Dir['*'].select{|v| v !='app' && v != 'lib' && v != 'config' && v != 'public' && v!= 'log'} + ['app/templates','config/mongoid.yml']).collect do |v|
|
git_add_custom = (Dir['*'].select{|v| v !='app' && v != 'lib' && v != 'config' && v != 'public' && v!= 'log'} + ['app/templates','config/mongoid.yml','config/extra_lang.txt']).collect do |v|
|
||||||
"#{git} add -f --all --ignore-errors '#{v}'"
|
"#{git} add -f --all --ignore-errors '#{v}'"
|
||||||
end.join(' ; ')
|
end.join(' ; ')
|
||||||
git_restore = "#{git} checkout ."
|
git_restore = "#{git} checkout ."
|
||||||
|
|
Loading…
Reference in New Issue