问题描述
我已经阅读了Cloud Tasks API文档,以管理大量分布式请求的执行.
但是我在文档中找不到任何可以重试任何特定任务的文档.
使用Cloud Tasks API创建任务的请求正文为:
{
"responseView": "",
"task": {
"appEngineHttpRequest": {
"appEngineRouting": {},
"body": "",
"headers": {},
"httpMethod": "",
"relativeUri": ""
}
}
}
在此请求正文中没有可以设置的重试参数.但是,使用Cloud Tasks API创建队列时,有 retryConfig 可用,但是问题在于它为整个队列而不是特定任务设置了重试./p>
我需要类似于taskqueue.add()中可用的TaskRetryOptions的功能
在Cloud Tasks API中可以通过某种方式实现吗?
目前,您无法按任务设置重试,只能按队列设置.
I have read the Cloud Tasks API documentation to manage the execution of large numbers of distributed requests.
But I can't find anything in documentation which enables the retry for any specific task only.
The request body to create tasks using Cloud Tasks API is:
{
"responseView": "",
"task": {
"appEngineHttpRequest": {
"appEngineRouting": {},
"body": "",
"headers": {},
"httpMethod": "",
"relativeUri": ""
}
}
}
There is no retry parameter which can be set in this request body.However, there is retryConfig available while creating a queue using Cloud Tasks API, but the problem with that is it sets the retry for the whole queue instead of a specific task.
I need functionality similar to TaskRetryOptions available in taskqueue.add()
Is that possible somehow in Cloud Tasks API?
At this time, you are unable to set retries by task, only by queue.
这篇关于在任务级别重试Cloud Tasks API集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!