Where can I find the signals FAIL, SKIP, etc. in P...
# ask-community
t
Where can I find the signals FAIL, SKIP, etc. in Prefect 2.0? I am getting an error when importing them from the old place.
1
API Reference makes me think they don't exist. If not, how would I replicate raising a SKIP() signal?
a
What is your use case you would like to apply signals for? In 2.0 you can write arbitrary Python in your flow and raise exceptions so signals are no longer needed - curious to hear more about your use case
t
I have been using signals mainly to skip over and "return" success when I have no data to process from some APIs I hit. I guess I should just evaluate in the flow function and return what exactly?
k
You can do:
Copy code
@flow
def myflow():
    a = task_one():
    if a.result() is not None:
        task_two(a)
something like that. That is a native Python SKIP
👍 1
t
Thanks!
👍 1