Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google应用程序引擎Python';那是什么?_Python_Google App Engine - Fatal编程技术网

Google应用程序引擎Python';那是什么?

Google应用程序引擎Python';那是什么?,python,google-app-engine,Python,Google App Engine,我的代码中有一个http请求,需要5-10秒才能运行。通过搜索此站点,我找到了超时前增加限制的代码: from google.appengine.api import urlfetch urlfetch.set_default_fetch_deadline(60) 我的问题是:“60”是什么数字?秒还是十分之一秒?大多数的回答似乎暗示这是几秒钟,但这不可能是正确的。当我使用60时,在本地主机上测试时,我会在不到10秒内得到一个超时。为了避免这个问题,我必须将数字设置为至少100,我担心这会引起

我的代码中有一个http请求,需要5-10秒才能运行。通过搜索此站点,我找到了超时前增加限制的代码:

from google.appengine.api import urlfetch
urlfetch.set_default_fetch_deadline(60)

我的问题是:“60”是什么数字?秒还是十分之一秒?大多数的回答似乎暗示这是几秒钟,但这不可能是正确的。当我使用60时,在本地主机上测试时,我会在不到10秒内得到一个超时。为了避免这个问题,我必须将数字设置为至少100,我担心这会引起谷歌众神的愤怒。

时间是秒,你可以在fetch函数中传递它。您是否尝试获取其他网站?你确定这是超时而不是另一个错误吗?