error handling on proc update
This commit is contained in:
parent
230b6edc9f
commit
6b1d5f9179
1 changed files with 12 additions and 10 deletions
|
@ -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,17 +79,20 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
|
||||||
public void updateProctoringCollectingRooms() {
|
public void updateProctoringCollectingRooms() {
|
||||||
this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateActive()
|
try {
|
||||||
.getOrThrow()
|
this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateActive()
|
||||||
.stream()
|
.getOrThrow()
|
||||||
.forEach(this::assignToRoom);
|
.stream()
|
||||||
|
.forEach(this::assignToRoom);
|
||||||
|
|
||||||
this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateInactive()
|
this.clientConnectionDAO.getAllConnectionIdsForRoomUpdateInactive()
|
||||||
.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
|
||||||
|
|
Loading…
Add table
Reference in a new issue