use of com.hubspot.singularity.SingularityAgent in project Singularity by HubSpot.
the class SingularityUsageHelper method getAgentsToTrackUsageFor.
public List<SingularityAgent> getAgentsToTrackUsageFor() {
List<SingularityAgent> agents = agentManager.getObjects();
List<SingularityAgent> agentsToTrack = new ArrayList<>(agents.size());
for (SingularityAgent agent : agents) {
if (agent.getCurrentState().getState().isInactive() || agent.getCurrentState().getState() == MachineState.DECOMMISSIONED) {
continue;
}
agentsToTrack.add(agent);
}
return agentsToTrack;
}
Aggregations