Hi, How can i run prefect tasks in order of downst...
# prefect-community
a
Hi, How can i run prefect tasks in order of downstream, for example if i have three tasks a, b , c and the stream looks like a > b > c, then if there is one worker. then i want to run a then b and then c, but its running likt a for first element in stream, then a again then b, then b again for next element and then c
k
Hey @Ayush Bairagi, is this for Prefect 1 or 2? This is for Prefect 1
For 2.0, check for the
wait_for
here
a
hi @Kevin Kho I am able to set upstreams, what i want is to complete downstream tasks before running any upstream for next element,
k
Ah I understand. For 1.0 or 2.0?
a
for 1.0
k
For 1.0, you can’t really do this use case because it violates the DAG. You need to compress them into one task and take advantage of task looping. Or you can put them in a subflow, and then just
map
over
create_flow_run
calls with the default
LocalExecutor
to make it sequential
a
Thanks @Kevin Kho is it possible in 2.0?
also is there any way i can trigger a task mannually, like once i am done with a, i trigger b?
k
2.0 has no DAG so it’s a lot easier, but doesn’t have pause yet. Prefect 1.0 has the pause
a
Hi @Kevin Kho I am using prefect 2.0 can you guide me how can i perform above task?
if you can refer to a doc
k
Something like this