fix error
This commit is contained in:
parent
2bfcff5ddc
commit
3bb22a8853
|
@ -22,7 +22,10 @@ class Admin::RulingBusesController < OrbitAdminController
|
||||||
@ruling_bus_setting = RulingBusSetting.find(params[:id])
|
@ruling_bus_setting = RulingBusSetting.find(params[:id])
|
||||||
@ruling_bus_setting.update_attributes(ruling_bus_setting_params)
|
@ruling_bus_setting.update_attributes(ruling_bus_setting_params)
|
||||||
Thread.new do
|
Thread.new do
|
||||||
system("UNICORN_PID=`cat tmp/pids/unicorn.pid` && kill -s USR2 $UNICORN_PID && sleep 3 && kill -s QUIT $UNICORN_PID")
|
sleep 3
|
||||||
|
mode = Rails.env
|
||||||
|
content = "UNICORN_PID=\"`fuser tmp/pids/unicorn.sock tmp/sockets/unicorn.sock tmp/unicorn.sock` `cat tmp/pids/unicorn.pid `\" && kill -s TERM $UNICORN_PID ; while (kill -0 $UNICORN_PID > /dev/null 2>&1) ; do printf '.' && sleep 1 ; done ; unset UNICORN_FD; bundle exec unicorn_rails -c config/unicorn.rb -D -E #{mode}"
|
||||||
|
system(content)
|
||||||
end
|
end
|
||||||
redirect_to (params[:referer_url].blank? ? "/#{I18n.locale}/admin/ruling_buses": params[:referer_url])
|
redirect_to (params[:referer_url].blank? ? "/#{I18n.locale}/admin/ruling_buses": params[:referer_url])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue