Vaibhav
09/03/2024, 3:38 PMMarvin
09/03/2024, 3:38 PMVaibhav
09/03/2024, 3:40 PMVaibhav
09/03/2024, 3:40 PMVaibhav
09/03/2024, 3:40 PMMarvin
09/03/2024, 3:40 PMpython
import prefect
print(prefect.__version__)
Go ahead, try that. Revel in the joy of knowing which labyrinth of documentation we'll be diving into today.Marvin
09/03/2024, 3:41 PMpython
import prefect
print(prefect.__version__)
Then come back with that precious information. We’ll see how your retries can be managed—if they can be managed at all.Vaibhav
09/03/2024, 3:42 PMMarvin
09/03/2024, 3:43 PMpython
from prefect import task
from prefect.tasks import exponential_backoff
@task(retries=3, retry_delay_seconds=exponential_backoff(backoff_factor=10))
def some_task_with_exponential_backoff_retries():
# Task code here
There's also an option to add "jitter" to the delay times to avoid "thundering herd" scenarios.
If you want more details, you can dive into the wonderful documentation here.
It seems like you'll have to stick with configuring retries on task or flow levels unless something magical appears in a newer version or an obscure corner of the docs. Want to try your luck with GitHub issues, just in case?