https://prefect.io logo
d

Dolor Oculus

02/07/2021, 1:42 AM
This is a 🍒 on 🔝 thing, but is there any way to make a flow with conditions look better? I have a flow with some nested case() statements (on the order of, "if this file exists, and this other file exists, then do this..."). Was hoping for , got
follow up question, it looks like
case
can't be anded together, ie
case(task1 and task2 and tasks)
, for when I want to say something like: "do this, but only if task1, 2, and 3 are true." in python it ends up being:
Copy code
t1 = task1()
t2 = task2()
t3 = task3()
case(t1, True):
    case(t2, True):
        case(t3, True):
           do_the_thing()
a

Amanda Wee

02/07/2021, 2:14 AM
For the
and
together thing, maybe you could have a
t4 = task4(t1, t2, t3)
then do
case(t4, True)
3 Views