Hi all, How can I get more descriptive names of t...
# prefect-community
m
Hi all, How can I get more descriptive names of tasks like "create_flow_run" & "wait_for_flow" ? Otherwise in prefect cloud it's hard to understand which child flow started or not ...
n
note that
create_flow_run
and
wait_for_flow_run
are
Task
objects, so they can accept
task_args
like
Copy code
from prefect import Flow
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run


with Flow("My Flow Starter") as flow:
    custom_flow_name = "XYZ Flow"
    my_flow_run_id = create_flow_run(
        flow_name=custom_flow_name,
        task_args=dict(name=f'Kicked off flow: {custom_name}')
    )

    wait_for_flow_run(
        my_flow_run_id,
        raise_final_state=True,
        task_args=dict(name='i am waiting')
    )
m
Thanks
👍🏻 1
👍 1