in server/src/jetbrains/buildServer/queueManager/settings/QueueStateManager.java [121:146]
private void doLoad() {
if (!myConfigFile.exists() || !myConfigFile.canRead()) {
return; // initial state is already loaded
}
Map<String, String> result = new HashMap<>();
Element element;
try {
element = FileUtil.parseDocument(myConfigFile);
} catch (Exception e) {
LOG.warnAndDebugDetails("Failed to load usage statistics settings from file \"" + myConfigFile.getAbsolutePath() + "\"", e);
return;
}
element.getChildren("param").forEach(it -> {
if (it instanceof Element) {
Element el = (Element) it;
final String name = el.getAttributeValue("name");
final String value = el.getAttributeValue("value");
if (!StringUtil.isEmptyOrSpaces(name) && !StringUtil.isEmptyOrSpaces(value)) {
result.put(name, value);
}
}
});
myStateRef.set(from(result));
setSystemProperty(result.get(FIELDS.QUEUE_ENABLED));
myGlobalHealthItemsTracker.recalculate();
}