python - App Engine httplib.HTTPConnection 截止日期

标签 python google-app-engine

由于 App Engine 的 httplib 只是包裹在他们自己的 urlfetch 中,我想知道如何将默认的 urlfetch 超时设置为允许的最大 10 秒所以它会影响 httplib.HTTPConnection

我不能直接在 HTTPConnection 上设置超时,因为 GAE 使用 2.5。 2.6 添加超时参数。

最佳答案

您是否尝试过更改默认的 urlfetch 截止日期?

import urlfetch
urlfetch.set_default_fetch_deadline(10)

关于python - App Engine httplib.HTTPConnection 截止日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7673404/

相关文章:

java - RuntimeException 不会停止 GAE,但在本地运行时返回 HTTP 500

python - db.Model 类变量和 __init__

node.js - 仅在 Azure AD 登录上使用 GCP 自定义域时,GCP 和 Azure : AADSTS700016:You may have sent your authentication request to the wrong tenant. 错误

python - 如何一起检查一个范围内的两个值?

python - 属性错误 : 'BooleanFalse' object has no attribute 'evalf' (piecewise plotting using sympy)

python - 预填充 Flask SQLAlchemy 数据库

python - 经过长时间训练后,经过训练的模型几乎可以将所有内容作为一类进行检测

google-app-engine - Google 应用引擎 : which solves the race condition? 事务或比较并设置?

c++ - Python 等效于 std::set 和 std::multimap

java - 具有多个服务器实例的 AppEngine JDO 丢失通过 key 获取的实体的事务更新