From 5ed368181bcb97b12387c9d6f24fec79530765fa Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 1 Feb 2022 16:09:26 +0100 Subject: [PATCH] SEBSERV-266 --- .../session/impl/ExamSessionControlTask.java | 14 ++++++++++++-- .../resources/config/application-dev.properties | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionControlTask.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionControlTask.java index af093b3f..df94c743 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionControlTask.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionControlTask.java @@ -84,6 +84,8 @@ class ExamSessionControlTask implements DisposableBean { this.examTimePrefix, this.examTimeSuffix); + this.webserviceInfoDAO.isMaster(this.webserviceInfo.getWebserviceUUID()); + SEBServerInit.INIT_LOGGER.info("------>"); SEBServerInit.INIT_LOGGER.info( "------> Activate SEB lost-ping-event update background task on a fix rate of: {} milliseconds", @@ -92,7 +94,7 @@ class ExamSessionControlTask implements DisposableBean { @Scheduled( fixedDelayString = "${sebserver.webservice.api.exam.update-interval:60000}", - initialDelay = 30000) + initialDelay = 10000) public void examRunUpdateTask() { if (!this.webserviceInfoDAO.isMaster(this.webserviceInfo.getWebserviceUUID())) { @@ -112,7 +114,7 @@ class ExamSessionControlTask implements DisposableBean { @Scheduled( fixedDelayString = "${sebserver.webservice.api.seb.lostping.update:5000}", - initialDelay = 30000) + initialDelay = 5000) public void examSessionUpdateTask() { this.sebClientConnectionService.updatePingEvents(); @@ -121,6 +123,10 @@ class ExamSessionControlTask implements DisposableBean { return; } + if (log.isTraceEnabled()) { + log.trace("Run exam session update task"); + } + this.sebClientConnectionService.cleanupInstructions(); this.examProcotringRoomService.updateProctoringCollectingRooms(); } @@ -134,6 +140,10 @@ class ExamSessionControlTask implements DisposableBean { return; } + if (log.isTraceEnabled()) { + log.trace("Run exam session cleanup task"); + } + this.sebClientConnectionService.cleanupInstructions(); } diff --git a/src/main/resources/config/application-dev.properties b/src/main/resources/config/application-dev.properties index 08615890..c9104516 100644 --- a/src/main/resources/config/application-dev.properties +++ b/src/main/resources/config/application-dev.properties @@ -12,7 +12,7 @@ logging.level.ch=INFO logging.level.ch.ethz.seb.sebserver.webservice.datalayer=INFO logging.level.org.springframework.cache=INFO logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl=INFO -logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session=INFO +logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session=DEBUG logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session.impl.proctoring=INFO logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session.impl.indicator=DEBUG #logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl=DEBUG