https://prefect.io logo
Title
s

Stefan

02/23/2023, 8:19 PM
Hi! How can I trigger another flow run from an existing deployment from a flow? Say I want to generate a flow run from Flow B as soon as Flow A finishes, but they are different and independent flows and deployments. Can I do it in Python, or an API call?
1
This can be called from one flow to start and monitor a flow run of a different deployment
s

Stefan

02/23/2023, 8:21 PM
Cheers, thanks! But I'm assuming that would mean the first flow does not finish until the last one dos?
d

Dylan

02/23/2023, 8:22 PM
You can set a timeout -- if the timeout is 0 the function will return immediately
So you could have Flow Run A start Flow Run B and continue without waiting for Flow Run B to finish
s

Stefan

02/23/2023, 8:27 PM
Awesome. So I import run_deployment from prefect.deployments and run it as a function? Looks good!
d

Dylan

02/23/2023, 8:27 PM
Yup!