gpt4 book ai didi

python - Google App Engine 查询限制和超时

转载 作者:太空宇宙 更新时间:2023-11-03 19:29:41 24 4
gpt4 key购买 nike

我正在使用 App Engine 构建网站,现在我担心每个请求 30 秒的时间限制。

例如,我有超过 10,000 名成员(member)甚至更多,我会执行以下操作:

# class Member(db.Model): ...
# Start a query
result = Member.all().filter('username =','example').filter('password = ','123456').get()
#Will this time out?
result = Member.all().order('joindate').fetch(10)
#Will this time out?

我想知道,这些查询在没有超时的情况下还能工作吗?我担心 .all().filter().order() 会超时。

当成员数量过多时,是否有更安全的方法来做到这一点?

顺便问一下,当我将视频上传到应用引擎 Blobstore 时,每个请求 30 秒的限制是否适用? Blobstore 的最大单个文件大小为 2GB,如果我通过 HTML 表单上传,可能需要几个小时。每个请求 30 秒的限制是否适用?

非常感谢!

最佳答案

简而言之:

  1. 前两次获取查询将在 1 秒内完成。实际上,应该在几百毫秒或几十毫秒内完成。

  2. “.all().filter().order()”根本没有尝试获取任何数据,因此不必担心时间。

关于python - Google App Engine 查询限制和超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6577147/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com