问题
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?
回答1:
At this time, you are unable to set retries by task, only by queue.
来源:https://stackoverflow.com/questions/56804715/cloud-tasks-api-set-retry-at-task-level