Jai P
04/27/2022, 6:29 PMwait_for
between the subflows? i'll drop a trivial example in the thread@task
def my_task():
...
@flow
def subflow_1():
my_task()
@flow
def subflow_2():
my_task()
@flow
def my_flow():
subflow_1()
subflow_2()
my_task
running twice (maybe its a time-intensive task) in parallelAnna Geller
04/27/2022, 6:33 PMfrom prefect.task_runners import SequentialTaskRunner
@flow(task_runner=SequentialTaskRunner())
Jai P
04/27/2022, 6:35 PM@task
def my_task():
...
@task
def my_task_2():
...
@flow
def subflow_1():
my_task()
my_task_2()
@flow
def subflow_2():
my_task()
my_task_2()
@flow
def my_flow():
subflow_1()
subflow_2()
and the hope would be that my_task()
runs once and retrieves from cache once, but then my_task_2()
can return to being run in parallelSequentialTaskRunner
on the task itself?Anna Geller
04/27/2022, 6:42 PMJai P
04/27/2022, 8:43 PMAnna Geller
04/27/2022, 9:17 PM