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
Tim Enders
06/08/2022, 7:42 PM
API Reference makes me think they don't exist. If not, how would I replicate raising a SKIP() signal?
a
Anna Geller
06/08/2022, 7:54 PM
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
Tim Enders
06/08/2022, 7:57 PM
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
Kevin Kho
06/08/2022, 8:17 PM
You can do:
Copy code
@flow
def myflow():
a = task_one():
if a.result() is not None:
task_two(a)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.