Giacomo Chiarella
04/21/2023, 1:23 PMflapili
04/21/2023, 1:26 PMGiacomo Chiarella
04/21/2023, 1:28 PMhow to identify the deployment which triggered the flow?
If I know if I could implement the logic and even avoid to present these parameters in the uiflapili
04/21/2023, 1:29 PMGiacomo Chiarella
04/21/2023, 1:29 PMflapili
04/21/2023, 1:39 PMfrom prefect import flow
from prefect.context import get_run_context
@flow
def main():
ctx = get_run_context()
print(ctx.flow_run.deployment_id)
Giacomo Chiarella
04/21/2023, 1:42 PMget_run_logger().info(get_client().read_deployment(FlowRunContext.get().flow_run.deployment_id).name)
I found it! Thanks!flapili
04/21/2023, 1:43 PMGiacomo Chiarella
04/21/2023, 1:44 PMflapili
04/21/2023, 1:45 PMGiacomo Chiarella
04/21/2023, 1:46 PM