Hello, what is the proper way of triggering the sa...
# prefect-community
d
Hello, what is the proper way of triggering the same flow with different parameters in prefect 2, and then wait for all of them to finish. Example of what I want to achieve:
Copy code
flow_run_ids=[]
for param in params:
    flow_run_id = create_flow_run(
            flow=flow_model,
            parameters=run_params,
            name=run_name,
            state=state
        )
    flow_run_ids.append(flow_run_id)

wait_for_flows(flow_run_ids)
Thanks for any help
m
Hey Dennis, I think you should be able to accomplish this with the run_deployment function here https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments.py#L44
🙏 1
d
Awesome thank you, we stumbled on this in the meantime and utilized it, thank you for confirming.