Rohit
06/27/2022, 11:38 AMZheng Cheng
06/27/2022, 11:43 AMZheng Cheng
06/27/2022, 3:18 PMKevin Kho
async def run(name: str):
"""
Create a flow run for the given flow and deployment.
The flow run will be scheduled for now and an agent must execute it.
The flow run will not execute until an agent starts.
"""
async with get_client() as client:
try:
deployment = await client.read_deployment_by_name(name)
except ObjectNotFound:
exit_with_error(f"Deployment {name!r} not found!")
flow_run = await client.create_flow_run_from_deployment(deployment.id)
console.print(f"Created flow run {flow_run.name!r} ({flow_run.id})")
Zheng Cheng
06/27/2022, 3:24 PMKevin Kho
Zheng Cheng
06/27/2022, 3:54 PM