Hi all, Prefect newbie here 🙂.
I’m looking for some advice on best practice around sequencing tasks. The tasks aren’t passing any data between each other, but must run in my specified sequence.. I’ve played around with set_upstream/downstream but can’t come up with the schematic I’m after.
Use case:
Task 1 executes
Task 2 and 3 both execute on success of Task 1
Task 4 executes on success of both Task 2 and 3
Any ideas or pointers would be appreciated 🙂
n
nicholas
03/29/2021, 3:18 PM
Hi @Joseph Ellis, you can do something like this:
Copy code
with Flow("my flow") as flow:
t1 = task_1()
t2 = task_2(upstream_tasks=[t1])
t3 = task_3(upstream_tasks=[t1])
t4 = task_4(upstream_tasks=[t2, t3])