APs running into Backoff shows as connected.

Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
This commit is contained in:
Mike Hansen
2021-07-21 10:56:39 -04:00
parent 80834c0a31
commit cbd27b37bf
3 changed files with 12 additions and 66 deletions

View File

@@ -161,6 +161,7 @@ public class MqttStatsPublisher implements StatsPublisherInterface {
@Override
@Async
public void processMqttMessage(String topic, Report report) {
long startTime = System.nanoTime();
String apId = extractApIdFromTopic(topic);
LOG.info("Received report on topic {} for ap {}", topic, report.getNodeID());
@@ -170,6 +171,16 @@ public class MqttStatsPublisher implements StatsPublisherInterface {
return;
}
if (apId != null) {
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(extractApIdFromTopic(topic));
if (ovsdbSession != null) {
ovsdbSession.setMostRecentStatsTimestamp(System.currentTimeMillis());
LOG.debug("Last metrics received from AP updated to {}",ovsdbSession.toString());
} else {
LOG.debug("No ovsdb session exists for this AP {}",apId);
}
}
int customerId = ce.getCustomerId();
long equipmentId = ce.getId();
long locationId = ce.getLocationId();