Hi! In prefect 2.0 is there a way to parallelize multiple subflows?
ie.
Copy code
@flow(name="subflow")
def sub_flow():
.... some api call ...
return response
@flow(name="parent flow")
def parent_flow():
for i in range(3):
response = sub_flow()
This flow is quite simple but in reality my subflow is going to be much more complicated
m
Mason Menges
08/10/2022, 8:41 PM
Hey @Neil Natarajan You can checkout more details here https://docs.prefect.io/concepts/flows/ but from this doc:
"Subflows will block execution of the parent flow until completion. However, asynchronous subflows can be run in parallel by using AnyIO task groups or asyncio.gather."
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.