Keith08/06/2022, 12:59 AM
parameter that you could pass to tasks so that each task knew to wait for the previous one to run. Through my reading of the documentation it seems like this is not necessary anymore b/c everything should run like it would in Python so it basically defaults to a sequential executor. Is this the correct logic? Obviously this story changes a bit when adding in the different
but just wanted to confirm that using default code blocks that tasks run in sequence and won't run the next task until the previous one is complete.
Nico Neumann08/06/2022, 1:04 AM
As for as I know default should be to run task in sequential order, so there is no need to include
from prefect import flow, get_run_logger, task @task def task1(): logger = get_run_logger() while True: <http://logger.info|logger.info>("task1") @task def task2(): logger = get_run_logger() while True: <http://logger.info|logger.info>("task2") @flow(name="Test Flow") def flow_run(): task1() raise Exception() task2() flow_run()
https://docs.prefect.io/api-ref/prefect/task-runners/#prefect.task_runners.ConcurrentTaskRunner Depends on your use case you might want to switch to