Google Apps 脚本配额如何对网络应用程序中的 doGet 和 doPost 函数起作用? [英] How do Google Apps Script quotas work for doGet and doPost functions in web apps?

查看:27
本文介绍了Google Apps 脚本配额如何对网络应用程序中的 doGet 和 doPost 函数起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读https://developers.google.com/apps-script/guides/services/quotas 并了解配额是什么以及它们是如何工作的.

I've read https://developers.google.com/apps-script/guides/services/quotas and understand what the quotas are and how they work.

我无法弄清楚配额是如何应用于网络应用程序的,特别是 doGetdoPost 函数?

What I can't figure out is how the quotas apply to web apps, specifically with the doGet and doPost functions?

例如:

  • 假设一个网络应用通过 doGet 提供静态 HTML 内容——Script runtime 是唯一适用的配额吗?
  • 假设一个 Web 应用程序通过 doGet 为动态 HTML 内容提供服务,该应用程序从工作表中提取和显示数据——适用哪些配额?
  • 如果 Web 应用程序也接受使用 doPost 提交的表单会怎样?
  • Say a web app serves static HTML content via doGet -- is Script runtime the only quota that would apply?
  • Say a web app services dynamic HTML content via doGet that pulls and displays data from a Sheet -- which quotas apply?
  • What if the web app also accepts form submissions using doPost -- then what?

我了解配额适用于用户如何拥有网络应用程序.我只是无法弄清楚哪些配额适用于 Web 内容方面.显然 Script runtime 是适用的,但还有什么?

I understand the quotas are applied to the user how owns the web app. I just can't figure out which quotas apply for the web content side of things. Obviously Script runtime applies but what else?

推荐答案

以下配额(消费者版)适用:

The following quotas(consumer edition) apply:

  • 脚本运行时间 6 分钟/执行
  • 触发器总运行时间:90 分钟/天 这些似乎被排除在外 这里
  • 同时执行:30
  • Script runtime 6min/execution
  • Trigger total runtime: 90min/day These seem to be excluded here
  • Simultaneous execution: 30

UrlFetch 配额(如 50MB/帖子大小)也可能适用于 doPost().

UrlFetch quotas (like 50MB/Post size) may also apply to doPost().

但是请注意,这些配额通常不适用于您,而是适用于用户,如果脚本设置为用户访问 web 应用程序".因此,单个用户无法在短时间内同时执行 30 次脚本(如果发布为用户访问 Web 应用程序")

Note however that these quotas typically don't apply to you, but to the user, if script is set to execute as "User accessing the webapp". Therefore, a single user can't simultaneously execute script 30 times in a short time(if published to execute as "User accessing the web-app")

这篇关于Google Apps 脚本配额如何对网络应用程序中的 doGet 和 doPost 函数起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆