can we have custom _retry_delay_seconds_ passing function
details - i want to decide _retry_delay_seconds_ based on time of the day can it be possible
✅ 1
j
Jake Kaplan
02/12/2024, 4:22 PM
you can do this for tasks, not for flows though:
Copy code
from prefect import flow, task
def retry_delay_seconds_fn(num_retries: int) -> list[int]:
return [<do something based off current time> for i in range (num_retries)]
@task(retry_delay_seconds=retry_delay_seconds_fn, retries=3)
def my_task():
raise ValueError
@flow(log_prints=True)
def my_flow():
my_task()
my_flow()
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.