Hi everyone. I have a flow with some conditional l...
# ask-community
p
Hi everyone. I have a flow with some conditional logic. I want to exit cleanly if a particular condition is met. I am using
exit(0)
but Prefect sees that as a crash. What is the recommended approach? I am doing something like this:
Copy code
@flow
def my_flow():
   if not condition:
       run_task()
       exit(0)
    do_other_stuff()
never mind. I can
return
instead of
exit(0)
n
yep, thats what I would do