Haotian Li
02/21/2023, 1:02 PMStéphan Taljaard
02/21/2023, 3:57 PM@task
async def is_running_from_deployment() -> bool:
task_run_context = get_run_context()
flow_run_id = task_run_context.task_run.flow_run_id
async with get_client() as client:
flow_run = await client.read_flow_run(flow_run_id)
return bool(flow_run.deployment_id)