fixed missing ping problem in distributed environments

This commit is contained in:
anhefti 2021-11-25 14:13:59 +01:00
parent 46786af1d6
commit 82222b3fae
2 changed files with 3 additions and 2 deletions

View file

@ -112,11 +112,12 @@ class ExamSessionControlTask implements DisposableBean {
@Scheduled(fixedRateString = "${sebserver.webservice.api.seb.lostping.update:5000}")
public void examSessionUpdateTask() {
this.sebClientConnectionService.updatePingEvents();
if (!this.webserviceInfoDAO.isMaster(this.webserviceInfo.getWebserviceUUID())) {
return;
}
this.sebClientConnectionService.updatePingEvents();
this.sebClientConnectionService.cleanupInstructions();
this.examProcotringRoomService.updateProctoringCollectingRooms();
}

View file

@ -83,7 +83,7 @@ public final class PingIntervalClientIndicator extends AbstractPingIndicator {
this.missingPing = this.pingErrorThreshold < value;
} catch (final Exception e) {
log.error("Failed to initialize missingPing: {}", e.getMessage());
this.missingPing = false;
this.missingPing = true;
}
}