Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud Tasks client ignores retry configuration

Basically what the title says. The API and client docs state that a retry can be passed to create_task:

        retry (Optional[google.api_core.retry.Retry]):  A retry object used
            to retry requests. If ``None`` is specified, requests will
            be retried using a default configuration.

But this simply doesn't work. Passing a Retry instance does nothing and the queue-level settings are still used. For example:

from google.api_core.retry import Retry
from google.cloud.tasks_v2 import CloudTasksClient

client = CloudTasksClient()
retry = Retry(predicate=lambda _: False)
client.create_task('/foo', retry=retry)

This should create a task that is not retry. I've tried all sorts of different configurations and every time it just uses whatever settings are set on the queue.

like image 228
Liam Meck Avatar asked Dec 05 '25 06:12

Liam Meck


1 Answers

Google Cloud Support has confirmed that task-level retries are not currently supported. The documentation for this client library is incorrect. A feature request exists here https://issuetracker.google.com/issues/141314105.

like image 175
Liam Meck Avatar answered Dec 08 '25 07:12

Liam Meck



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!