https://prefect.io logo
Title
t

Tomás Emilio Silva Ebensperger

08/24/2022, 6:36 PM
I am running two different agents in the same machine. It seems by default besides the labels you might add to the agents, it adds the label from the flow's storage (Flow.storage.labels) I do not want to have the same label present in those two agents. I was able to overcome this by simply defining
agent = LocalAgent()
agent.labels = ['custom_label'}
instead of passing the labels to the LocalAgent params upon instantiation. This way i have complete separation from agents even if they are running locally on the same machine Now the issue with registering flows is the same, the labels assigned to the flow are the ones you provide + that default local label. I can't seem to remove the default label before registration and the agents don't work, because their label must be a `superset`of the flow's labels.
1
1️⃣ 1
m

Mason Menges

08/24/2022, 8:39 PM
Hey @Tomás Emilio Silva Ebensperger you should be able to register the flows with it setting the default labels for the host
flow.register(add_default_labels=False)
this same idea should be doable for starting the agents as well https://docs-v1.prefect.io/orchestration/agents/local.html#agent-configuration