2
votes

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?

2

2 Answers

3
votes

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

0
votes

I would suggest creating a second task and specifying its scheduleTime.