, how can I assign a different name to different instances so that I can see which task instance is running in the UI without having to look at the logs?
k
Kevin Kho
07/26/2021, 5:07 PM
When you mean instances, do you mean you want the Flow runs to have different names?
Kevin Kho
07/26/2021, 5:12 PM
client.create_flow_run()
takes in a run name that you can use to give the Flow run a name.
z
Zanie
07/26/2021, 5:26 PM
Hey @Pedro Machado -- I think you're looking for something like this
Copy code
In [1]: from prefect.tasks.prefect import create_flow_run
In [2]: create_flow_run.name
Out[2]: 'create_flow_run'
In [4]: my_task = create_flow_run.copy(name="foo")
In [5]: my_task.name
Out[5]: 'foo'
Zanie
07/26/2021, 5:26 PM
I could also extend the built-in task to dynamically set the task name to the child flow run name, which could make a lot of sense I think?
p
Pedro Machado
07/26/2021, 5:46 PM
Hi Michael. This is helpful. I think it would be nice to set a more descriptive default name based on the child flow name. Maybe child flow name + flow run name?
I'd want to preserve the ability to set a custom name even if I have to use the
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.