如何在deploy_revision提供程序中设置超时? [英] How to set a timeout in deploy_revision provider?
问题描述
我发现厨师在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屋!