https://prefect.io logo
Title
t

Tolga Karahan

03/22/2023, 1:50 PM
Hi everyone. In Prefect 1, is there a mechanism so that one task starts after another one starts and both tasks run in parallel?
t

Tolga Karahan

03/22/2023, 4:02 PM
But, when we define upstream tasks, downstream tasks should wait until they finish right? What I need is always starting a task after a specific task starts but not finished yet.
d

Deceivious

03/22/2023, 4:50 PM
Unsure if that is available. U can always use the prefect api to query for status of previous task within the downstream task and then run the actual code after ur requirements are met. That's all I have . 🤷 Best of luck.
👍 1
m

Marwan Sarieddine

03/22/2023, 10:02 PM
You can create a separate flow for your downstream task, and call start_run without waiting, this way you don’t have to wait on the upstream task to complete.. see https://docs-legacy.prefect.io/api/0.10.7/tasks/cloud.html#flowruntask
t

Tolga Karahan

03/23/2023, 6:10 AM
@Marwan Sarieddine thanks. It was what I was considering.
👍 1