error handling on proc update

This commit is contained in:
anhefti 2020-11-12 14:27:59 +01:00
parent 230b6edc9f
commit 6b1d5f9179
No known key found for this signature in database
GPG key ID: E9AD9471B6BC114D

View file

@ -17,7 +17,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringSettings; import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringSettings;
import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringSettings.ProctoringServerType; import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringSettings.ProctoringServerType;
@ -80,8 +79,8 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
} }
@Override @Override
@Transactional
public void updateProctoringCollectingRooms() { public void updateProctoringCollectingRooms() {
try {
this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateActive() this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateActive()
.getOrThrow() .getOrThrow()
.stream() .stream()
@ -91,6 +90,9 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
.getOrThrow() .getOrThrow()
.stream() .stream()
.forEach(this::removeFromRoom); .forEach(this::removeFromRoom);
} catch (final Exception e) {
log.error("Unexpected error while trying to update proctoring collecting rooms: ", e);
}
} }
@Override @Override