Ashley Felber
12/13/2022, 3:19 PMNate
12/13/2022, 3:56 PMrun_deployment
(docs)
where you can build a deployment for A and B (using whatever infrastructure / image you want for either) and then write something like
from prefect.deployments import run_deployment
@flow
def orchestrator_flow():
A_flow_run_model = run_deployment(name="DeploymentA", parameters={"Marvin": 42})
if A_flow_run_model.state.name = "Completed": # or however you want to respond to state changes
B_flow_run_model = run_deployment(name="DeploymentB", parameters={"Alice": "Bob"})
where the flow runs for A and B will become subflow runs of orchestrator_flow
because that's where they're called fromAshley Felber
12/13/2022, 4:09 PM