Hey folks, What’s the expected behaviour when ther...
# prefect-community
b
Hey folks, What’s the expected behaviour when there’s a cleanup task waiting on a set of tasks and one of the upstream task fails? How does the overall state of the flow get resolved? Code below to clarify this.
Copy code
@flow
def test_flow(nums: list = None):
    test_futures = [square.submit(num) for num in nums]
    return do_cleanup.submit(wait_for=test_futures)
In the above does do_cleanup get invoked or does the flow directly go into a failed state?
1
k
You might find this useful
b
The behaviour is not exactly deterministic as per the docs. E.g. •
do_cleanup
is not being invoked if any of the
test_futures
fail Running prefect 2.2.0
k
It is because of your
wait_for
argument. If you remove
wait_for
,
do_cleanup
will run