Marcos
03/28/2023, 11:51 AMrun_deployment
as suggested and I'm not able to evaluate the flow state. I also tried to wrap the run_deployment
within a task.
@task()
def run_worker(name, flow_run_name, etc....):
flow_run = run_deployment(
name=name,
flow_run_name=flow_run_name,
timeout=timeout,
tags=tags,
poll_interval=poll_interval,
parameters=parameters,
)
if flow_run.is_failed():
raise FailedRun(message=f"Subflow {flow_run_name} failed to complete successfully.")
What's the best way of chaining up subflows and terminate the parent flow if any subflow fails?State
sub-object and then 2) I ended up verifying whether the flow run returned a completed state.
```@task()
def run_worker(name, flow_run_name, etc....):
flow_run = run_deployment(
name=name,
flow_run_name=flow_run_name,
timeout=timeout,
tags=tags,
poll_interval=poll_interval,
parameters=parameters,
)
if now flow_run.state.is_completed():
raise FailedRun(message=f"Subflow {flow_run_name} failed to complete successfully.")```