Pedro Machado
08/10/2021, 2:47 PMget_task_run_result
and create_flow_run
tasks described here. I'd like to treat the child flow as a single unit that can be retried or restarted if the flow fails. Currently, these are two separate tasks and I haven't been able to set them up this way. How could I change my flow to support retries/restart when the child flow fails?Kevin Kho
@task(max_retries = ..., retry_delay = ...)
def wrapper():
create_flow_run(...).run()
But this would create new flow runs. I think the better approach is to apply the retries on that sub flow because you ideally don’t want to rerun tasks that already succeeded.Pedro Machado
08/10/2021, 3:25 PMKevin Kho
@task(max_retries = ..., retry_delay = ...)
def wrapper():
flow_run_id = create_flow_run(...).run()
return flow_run_id
Zanie
create_flow_run
and set the retries, e.g.
my_create_flow_run = create_flow_run.copy()
my_create_flow_run.max_retries = 3