https://prefect.io logo
#prefect-community
Title
# prefect-community
a

Andrew Huang

03/24/2022, 10:33 PM
Is there an equivalent to
Copy code
from prefect.engine.state import Skipped
in orion? Maybe
Cancelled
? https://orion-docs.prefect.io/concepts/states/#state-details How do I import it?
from prefect.states import Cancelled
doesn’t seem to work
k

Kevin Kho

03/24/2022, 10:36 PM
None yet, but it will be added. What are you trying to do though? Cuz in Orion you can do:
Copy code
@flow
def myflow():
    a = task_one()
    if a.result() == "something":
        task_two()
so effectively the SKIP is controlled by the if statement. In Prefect one you can’t, use the
if
so you raise SKIP to propagate the signal downstream
a

Andrew Huang

03/24/2022, 10:38 PM
Okay that makes sense, but I think it’d be nice to have an indicator on the server that the run was “skipped” or “cancelled” because the requirements were met (e.g. there hasn’t been new data)
k

Kevin Kho

03/24/2022, 10:39 PM
Yes SKIP will be a thing because there are use cases where this if is janky to shape
a

Andrew Huang

03/24/2022, 10:40 PM
okay thanks!
a

Anna Geller

03/24/2022, 10:52 PM
@Andrew Huang why no longer Discourse? 😢
a

Andrew Huang

03/24/2022, 10:53 PM
😄 oh I was going to report back on Discourse (and I think it was quite late for you so I wanted Kevin to help me first haha)
👍 1
k

Kevin Kho

03/24/2022, 10:57 PM
Anna doesn’t sleep 😛
👀 1
a

Anna Geller

03/24/2022, 10:58 PM
once every couple of days 😂
😪 1
a

Andrew Huang

03/24/2022, 10:58 PM
my brain wouldn’t function without my 7+ hours lol
a

Andrew Huang

03/24/2022, 11:10 PM
ah I see; I was searching for State and I don’t think it showed up
👍 1
2 Views