gpt4 book ai didi

node.js - 使用 Google Cloud Functions 调用 App Engine 任务队列

转载 作者:太空宇宙 更新时间:2023-11-03 22:50:21 25 4
gpt4 key购买 nike

我已在 Google App Engine 任务队列中创建了一个推送队列。

队列名称:默认任务名称:[自动生成]

我尝试从 Google Cloud Functions 调用此任务队列,但无法了解其工作原理。

最佳答案

由于 Cloud Functions 不在标准环境 GAE 中运行,您将无法使用任务队列。 Task Queue 中提到了一些可能需要考虑的替代方案。 :

The Task Queue service has limited availability outside of the standard environment. If you want to use the service outside of the standard environment, you can sign up for the Cloud Tasks alpha.

Outside of the standard environment, you can't add tasks to push queues, but a service running in the flexible environment can be the target of a push task. You can specify this using the target parameter when adding a task to queue or by specifying the default target for the queue in queue.yaml.

In many cases where you might use pull queues, such as queuing up tasks or messages that will be pulled and processed by separate workers, Cloud Pub/Sub can be a good alternative as it offers similar functionality and delivery guarantees.

关于node.js - 使用 Google Cloud Functions 调用 App Engine 任务队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49126198/

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