Nadav Itach
11/08/2023, 7:59 AMMarvin
11/08/2023, 7:59 AMskip_on_upstream_skip
parameter in the Flow
class. This parameter, when set to False
, will ensure that the subflow is always run, regardless of the status of the upstream tasks. Here is an example:
from prefect import Flow, task
@task
def upstream_task():
# This task might fail
pass
@task
def subflow_task():
# This task should always run
pass
with Flow("My Flow") as flow:
upstream_task = upstream_task()
subflow_task = subflow_task(skip_on_upstream_skip=False)
flow.run()
In this example, subflow_task
will always run, even if upstream_task
fails.