如何在deploy_revision提供程序中设置超时? [英] How to set a timeout in deploy_revision provider?

查看:55
本文介绍了如何在deploy_revision提供程序中设置超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现厨师在git clone命令中生成Chef :: Exceptions :: CommandTimeout异常的情况。有时git clone的时间可能超过10分钟。如何在厨师食谱中为此类情况设置超时值?

解决方案

git提供程序的超时现在似乎已解决。 / p>

在以下位置签出代码: https://github.com/opscode/chef/blob/master/lib/chef/provider/git.rb#L292



因此,对于git资源,您只需添加 timeout 属性,即:

  git / var / www做
信息库< githubrepo>
操作:sync
用户www-data
组www-data
超时1200
结束


I found a situation when chef had generated Chef::Exceptions::CommandTimeout exception in git clone command. Sometimes the time of git clone could be more than 10 minutes. How to set the timeout value for such situations in chef recipe?

解决方案

Timeout for the git provider seems to be fixed now.

Checkout the code at: https://github.com/opscode/chef/blob/master/lib/chef/provider/git.rb#L292

So for the git resource you can just add the timeout attribute, i.e.:

git /var/www do
  repository <githubrepo>
  action :sync
  user www-data
  group www-data
  timeout 1200
end

这篇关于如何在deploy_revision提供程序中设置超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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