由于 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/