Nico Neumann
08/11/2023, 7:39 PMfrom prefect import flow
from prefect.context import get_run_context
from prefect.deployments import Deployment, run_deployment
@flow(name="a", log_prints=True)
def my_flow_a():
# always prints "a" even if I start flow b in prefect cloud
print(get_run_context().flow.name)
my_flow_b = my_flow_a.with_options(name="b")
Deployment.build_from_flow(
flow=my_flow_b,
name="deployment",
apply=True,
)
run_deployment(name="b/deployment")
Deceivious
08/14/2023, 1:24 PMrun_context