大佬教程收集整理的这篇文章主要介绍了ruby-on-rails – 重启Unicorn问题(capistrano),大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
namespace :deploy do task :restart do run "if [ -f #{unicorn_piD} ] && [ -e /proc/$(cat #{unicorn_piD}) ]; then kill -USR2 \`cat #{unicorn_piD}\`; else cd #{deploy_to}/current && bundle exec unicorn -c #{unicorn_conf} - E #{rails_env} -D; fi" end end
但它不起作用.我的意思是该命令执行(它询问密码并且没有错误),但是配置文件中的所有更改仍然被忽略(即工作进程数或数据库设置).
以下任务是我用于重启,停止和启动我的unicorn服务器的任务.
desc "Zero-downtime restart of Unicorn" task :restart,:except => { :no_release => true } do run "kill -s USR2 `cat #{shared_path}/pids/unicorn.pid`" end desc "Start unicorn" task :start,:except => { :no_release => true } do run "cd #{Current_path} ; bundle exec unicorn_rails -c config/unicorn.rb -D -E production" end desc "Stop unicorn" task :stop,:except => { :no_release => true } do run "kill -s QUIT `cat #{shared_path}/pids/unicorn.pid`" end
希望这对你有所帮助.
以上是大佬教程为你收集整理的ruby-on-rails – 重启Unicorn问题(capistrano)全部内容,希望文章能够帮你解决ruby-on-rails – 重启Unicorn问题(capistrano)所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。