Capistrano清理任务挂起了几次 [英] Capistrano cleanup task hangs some times

查看:67
本文介绍了Capistrano清理任务挂起了几次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么capistrano清理任务有时会挂起,我该如何解决?



到此为止,就坐在那里:

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

最奇怪的是,这种情况有时只会发生。



我将其作为我deploy.rb的最后一行:

 在 deploy:restart, deploy:cleanup之后#仅保留最后5个版本


解决方案

似乎我更改了 set:use_sudo,false 不再挂了。 p>

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

解决方案

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

这篇关于Capistrano清理任务挂起了几次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆