Hi! How can I trigger another flow run from an exi...
# best-practices
s
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
Cheers, thanks! But I'm assuming that would mean the first flow does not finish until the last one dos?
d
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
Awesome. So I import run_deployment from prefect.deployments and run it as a function? Looks good!
d
Yup!