Search code examples
pythongoogle-app-enginegoogle-cloud-tasks

Cloud Tasks API set retry at Task level


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?


Solution

  • At this time, you are unable to set retries by task, only by queue.