I have a task that ensures some log files are empty (task4 below), but with my current flow it is running first as a root task even when I built logic into try to run it last:
with Flow('Pipeline') as flow:
bool1 = task1.run()
bool2 = task2.run()
bool3 = task3.run()
if bool1 and bool2 and bool3:
task4.run()
So I get the sense that prefect doesn't care about the conditional logic. Is there a way to make tasks 1,2,3 upstream tasks for task4 ? The only way I can think of is introducing the bool variables as parameters to task4?
EDIT: https://github.com/PrefectHQ/prefect/blob/master/examples/conditional.py found this to be helpful