Jai P
05/03/2022, 3:09 PMdef a():
...
def b():
...
def c():
b()
def d():
b()
c()
there are a number of scenarios we could structure this where some things are `@flow`s, some things are `@task`s, or there's only one flow at the top and everything else is tasks, or everything is marked as a @flow
, etc. etc.Zanie
05/03/2022, 3:16 PMJai P
05/03/2022, 3:20 PMAnna Geller
05/03/2022, 5:12 PM@flow
async def main_flow():
parallel_subflows = [subflow_1(), subflow_2(), subflow_3(), subflow_4()]
await asyncio.gather(*parallel_subflows)
more on that hereZanie
05/03/2022, 5:14 PMJai P
05/03/2022, 7:03 PM@task
def a():
...
@task
def b(something):
...
def c():
a_result = a()
b_result = b(a_result)
@flow
def d():
c()
where, if possible, avoid making c
a subflow unless its absolutely necessary (maybe using a different taskrunner, or storage, or something)Zanie
05/03/2022, 7:18 PMJai P
05/03/2022, 8:04 PM