maxAttempts property

int? maxAttempts
getter/setter pair

Number of attempts per task, including the first attempt.

(If the first attempt fails, there will be max_attempts - 1 retries.) Must be greater than or equal to -1, which indicates unlimited attempts. Cloud Tasks stops retrying only when max_attempts and max_retry_duration are both satisfied, or when the task is successfully executed. When the task has been attempted max_attempts times and when the max_retry_duration time has passed, no further attempts are made, and the task is deleted. If max_attempts is set to -1 and max_retry_duration is set to 0, the task is retried until the maximum task retention limit is reached. If unspecified when the queue is created, Cloud Tasks will pick the default. This field has the same meaning as task_retry_limit in queue.yaml/xml.

Implementation

core.int? maxAttempts;