本文介绍了适用于python2.7 Google App Engine的Cloud Tasks API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Google App Engine Python 2.7下创建了一个项目.我已经使用 queue.yaml 创建了一些任务,并使用了 glcoud 命令进行了部署.当我转到任务队列"部分下的Google App Engine控制台时,它将重定向到云任务"页面.我可以看到我的App Engine队列列在云任务"下.

I have created a project under Google App Engine Python 2.7. I have created some tasks using queue.yaml and deployed with the glcoud command. When I go to the Google App Engine console under section "taskqueues", it redirects to the Cloud Tasks page. I can see my App Engine queues are listed under Cloud Tasks.

我仍然没有启用"Cloud Tasks API"服务,但是当我启动后台任务时,哪个服务正在处理队列?然后,如果我想将Cloud Tasks服务与App Engine Python 2.7一起使用,应该如何进行?

I have still not enabled 'Cloud Tasks API' service but when I launch background task which service is handling the queue? Then if I want to use Cloud Tasks service with App Engine Python 2.7, how should I proceed?

我已遵循文档 https://cloud.google.com/tasks/docs/dual-overview ,对于Python 2.7,我们可以通过App引擎Task Queue API访问Cloud Tasks服务.使用Cloud Tasks API服务有一些关键的参考,例如延迟的队列.我只想确保当我转到云任务"时这些功能将可用.两种服务如何共存?

I have followed documentation https://cloud.google.com/tasks/docs/dual-overview in which for Python 2.7 we can access Cloud Tasks service via App engine Task Queue API. There are some key deferences using Cloud Tasks API service such as deferred queues. I just want to make sure that these features will be available when I move to Cloud Tasks. How can both services coexist?

推荐答案

"Cloud Tasks API"提供了REST API,您可以使用该API从第二代App Engine标准环境运行时添加任务,任何App Engine灵活环境运行时,甚至完全不在App Engine外部.

The "Cloud Tasks API" provides a REST API that you can use to add tasks from a second generation App Engine standard environment runtime, any of the App Engine flexible environment runtimes, or even from entirely outside of App Engine.

创建第一代App Engine推/拉队列时,无需绕过直接使用此API的需要,但是所创建的任务与使用api创建的任务在同一服务上Cloud Tasks API.

When you're creating first-generation App Engine push/pull queues, you're bypassing the need to use this API directly, however the tasks that are being created are on the same service as if you had created them with the Cloud Tasks API.

这篇关于适用于python2.7 Google App Engine的Cloud Tasks API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 16:54