Leon Kozlowski
09/20/2024, 3:40 PMNate
09/20/2024, 3:48 PMIn [1]: from prefect import flow, get_client
In [2]: from prefect.context import get_run_context
...:
...: @flow
...: async def f():
...: async with get_client() as client:
...: await client.update_flow_run(get_run_context().flow_run.id, tags=['asdf'])
...:
In [3]: await f()
10:46:57.357 | INFO | prefect.engine - Created flow run 'gregarious-capybara' for flow 'f'
10:46:58.010 | INFO | Flow run 'gregarious-capybara' - Finished in state Completed()
Nate
09/20/2024, 3:48 PMupdate_flow_run
seems the easiest way imoLeon Kozlowski
09/20/2024, 3:49 PM