We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
需求:定时调用GCF
GCF
思路1:在GCF中使用setTimeout作为定时器,使用google pubsub再次publish消息到触发该GCF的TOPIC。
setTimeout
google pubsub
publish
TOPIC
当设置GCF的超时时间为10秒,通过环境变量指定setTimeout的时间为15秒,会导致GCF超时。
GCF超时日志:
还有一个问题是,在GCF中使用setTimeout会导致该GCF一直处在执行过程中,这样会导致费用上升,因为GCF的是根据调用次数和执行时间来收费的。
参考:
https://stackoverflow.com/questions/51695859/is-it-ok-to-use-settimeout-in-cloud-functions
https://stackoverflow.com/questions/52416538/firebase-function-cant-run-settimeout-in-background-continuously-for-cron-job
https://stackoverflow.com/questions/42790735/cloud-functions-for-firebase-trigger-on-time
The text was updated successfully, but these errors were encountered:
No branches or pull requests
需求:定时调用
GCF
思路1:在
GCF
中使用setTimeout
作为定时器,使用google pubsub
再次publish
消息到触发该GCF
的TOPIC
。当设置
GCF
的超时时间为10秒,通过环境变量指定setTimeout
的时间为15秒,会导致GCF
超时。GCF
超时日志:还有一个问题是,在
GCF
中使用setTimeout
会导致该GCF
一直处在执行过程中,这样会导致费用上升,因为GCF
的是根据调用次数和执行时间来收费的。参考:
https://stackoverflow.com/questions/51695859/is-it-ok-to-use-settimeout-in-cloud-functions
https://stackoverflow.com/questions/52416538/firebase-function-cant-run-settimeout-in-background-continuously-for-cron-job
https://stackoverflow.com/questions/42790735/cloud-functions-for-firebase-trigger-on-time
The text was updated successfully, but these errors were encountered: