Hi all - I am wondering what the best way is to determine what agent a flow is running on while its in progress
a
Anna Geller
11/19/2021, 6:07 PM
the easiest way would be to do find that out through labels, e.g. if you have the label “dev” assigned to a specific agent, and the same label is assigned to a flow’s run configuration
l
Leon Kozlowski
11/19/2021, 6:13 PM
would that be say a subclassed Task’s context?
a
Anna Geller
11/19/2021, 6:16 PM
it’s an attribute of a run configuration. You can see it in the UI under flow. From code, you could inspect it this way:
Copy code
from prefect.run_configs import LocalRun
run_config=LocalRun(labels=["dev"])
# inspecting:
run_config.labels
{'dev'}
k
Kevin Kho
11/19/2021, 6:32 PM
You can go to the
Agents
tab in the dashboard and it will give you the view
l
Leon Kozlowski
11/19/2021, 7:23 PM
I had terrible wording in my question, I mean in the context of inside a task
k
Kevin Kho
11/19/2021, 7:25 PM
It might have to be a graphql query. It won’t be in context
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.