Shahid Khan
03/11/2025, 7:11 PMreturn Cancelled(message="User requested task cancellation!")
Nate
03/11/2025, 7:34 PMShahid Khan
03/11/2025, 7:54 PMShahid Khan
03/11/2025, 8:05 PMtags
for task
.
I can update the flow tags by:
async with get_client() as client:
await client.update_flow_run(flow_run_id=run_id, tags=tags)
Is there any update_task_run
kinda function where I can update task tags dynamically?
Thanks for the prompt response.Nate
03/11/2025, 8:23 PM#[7]
from prefect import flow, task
#[8]
@task
def foo():
pass
#[9]
@flow
def f():
foo.with_options(tags=["asdf"])()
#[10]
f()
15:22:23.784 | INFO | Flow run 'golden-dalmatian' - Beginning flow run 'golden-dalmatian' for flow 'f'
15:22:23.786 | INFO | Flow run 'golden-dalmatian' - View at <http://localhost:4200/runs/flow-run/b2944caf-12cf-4de7-ba3b-77466be290de>
15:22:23.849 | INFO | Task run 'foo-a38' - Finished in state Completed()
15:22:23.868 | INFO | Flow run 'golden-dalmatian' - Finished in state Completed()
Shahid Khan
03/12/2025, 7:55 AMalert_status:found
, so that I can filter task with this tag and get the idea of number of alerts being generated.
Is there any way to update the tags for the task inside the function in Prefect 3?Nate
03/12/2025, 4:40 PMShahid Khan
03/12/2025, 6:51 PMNate
03/12/2025, 7:30 PM