how to stop the async task runs in flow context? I need to execute a loop in the flow context but I don’t want it to execute the next loop before the first loop is finished. I see the tasks are executed asynchrously. For example:
Copy code
with Flow(
name="ETL",
) as flow:
page = 0
max_page = 999999
while page <= max_page:
page += 1
dummy_task()
Tony Yun
08/19/2022, 3:52 PM
I read this in the prefect 2 doc but it seems it’s not available in 1:
Sequential execution
task runner:
Copy code
from prefect.task_runners import SequentialTaskRunner
m
Mason Menges
08/19/2022, 6:23 PM
Hey @Tony Yun in 1.0 this would be the LocalExecutor
Copy code
from prefect.executors import LocalExecutor
flow.executor = LocalExecutor()
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.