m

    Milly gupta

    1 year ago
    HI, I am not able to run any flow atm though Prefect dashboard shows I am using 0 slot
    One Prefect agent is running
    Greg Roche

    Greg Roche

    1 year ago
    Does the flow have the same label(s) as the agent? https://docs.prefect.io/orchestration/agents/overview.html#labels
    m

    Milly gupta

    1 year ago
    Ah I see. The flow has different label than the agent.
    Isn't it automatic whichever agent is available and flow would run on it.
    Greg Roche

    Greg Roche

    1 year ago
    No, it's not automatic. Many Prefect setups make use of multiple agents which should only run certain flows, and labels are a good way of ensuring each flow is only run by the correct agent.
    m

    Milly gupta

    1 year ago
    Ah makes sense. So how do assign an agent to a flow?
    Greg Roche

    Greg Roche

    1 year ago
    You assign a label to the flow, and you launch the agent with the same label. (Or if your setup is really simple, have no labels on the flow or the agent; agents with no labels will execute flows which have no labels). When the flow run is triggered, an agent which has the matching labels will see the pending flow run and will start executing it.
    m

    Milly gupta

    1 year ago
    Thank you so much. It seems like flow and agent are using some default labels.