https://prefect.io logo
m

Maggie Dart-Padover

07/06/2023, 2:10 PM
is there a way to do exponential backoff or something similar for retries?
hard same 1
1
e

Emil Christensen

07/06/2023, 2:16 PM
Yes, you can add a list of seconds to retry… let me find an example
Copy code
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():
   ...
🔥 3
m

Maggie Dart-Padover

07/06/2023, 2:22 PM
thanks!
❤️ 1