Capistrano cleanup task hangs some times

本小妞迷上赌 提交于 2019-12-13 02:38:23

问题


Why does the capistrano cleanup task hang sometimes and how can I fix it?

It get's to this point and just sits there:

* 2014-01-06 20:52:21 executing `deploy:cleanup'
  * executing "sudo -p 'sudo password: ' ls -1dt /var/www/jobfly/releases/* | tail -n +6 | sudo -p 'sudo password: ' xargs rm -rf"

The weirdest thing is that this only happens sometimes. Other times it executes just fine.

I have this as the last line in my deploy.rb:

after "deploy:restart", "deploy:cleanup" # leave the last 5 releases only

回答1:


It seems that if I change set :use_sudo, false it doesn't hang anymore.



来源:https://stackoverflow.com/questions/20963426/capistrano-cleanup-task-hangs-some-times

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!