are there docs or examples that demonstrate how to...
# prefect-community
m
are there docs or examples that demonstrate how to use
orion
for non-terminating long running workflows?
1
a
kind of - you may try this approach with a while loop https://medium.com/p/1737c80da3f5
there are lots of cons of long-running flows, I described pros and cons in this post
m
awesome thanks
🙌 1
to make sure i understand correctly, i haven't read through the post yet i have some other stuff to take care of this morning first...
but you would advise against something like this?
Copy code
@task
def my_listen_task():
	pass

@task
def my_process_task(data):
	pass

@task
def my_persistence_task(data):
	pass

@flow
def my_flow():
	while True:
		updates = my_listen_task()
		results = my_process_task(updates)

		if len(results) > 0:
			my_persistence_task(results)


if __name__ == '__main__':
	run_pipeline()
a
Yes exactly, the post explains why I think it's a bad idea
m
gotcha thanks
🙌 1