Joan Gil

01/31/2023, 2:31 PM
Hi all! I’m trying to deploy my prefect 2.0 flows in parallel (in batches of 2), the deployments seem to to start at the same time, but it looks like the 2nd one is blocked until the first one completes. Here’s a snippet of what I’m trying to do in a python script:
for sub_deployments in flows:
    await asyncio.gather(
       *[deploy_flow(deployment_config) for deployment_config in sub_deployments]
async def deploy_flow(deployment_config):

    flow = deployment_config.get("flow")

    print(f"deploying : {}")
    await Deployment.build_from_flow(
    print(f"applied deployment: {}")
I get the two flows deploying at the same time, but the first one always finishes first, and I have to wait for bout 2 minutes until the 2nd one finishes and it’s always like that, which tells me that something’s blocking the 2nd flow from being deployed/registered with the API.