fixed caching issues evict only in distributed env

This commit is contained in:
anhefti 2021-05-19 11:31:39 +02:00
parent 8daf39a177
commit 2ac17108d6
2 changed files with 6 additions and 2 deletions

View file

@ -321,7 +321,8 @@ public class ExamJITSIProctoringService implements ExamProctoringService {
long expTime = System.currentTimeMillis() + Constants.DAY_IN_MILLIS;
if (this.examSessionService.isExamRunning(examProctoring.examId)) {
final Exam exam = this.examSessionService.getRunningExam(examProctoring.examId)
final Exam exam = this.examSessionService
.getRunningExam(examProctoring.examId)
.getOrThrow();
if (exam.endTime != null) {
expTime = exam.endTime.getMillis();

View file

@ -227,7 +227,10 @@ public class ExamSessionServiceImpl implements ExamSessionService {
log.trace("Running exam request for exam {}", examId);
}
updateExamCache(examId);
if (this.distributedSetup) {
updateExamCache(examId);
}
final Exam exam = this.examSessionCacheService.getRunningExam(examId);
if (this.examSessionCacheService.isRunning(exam)) {