Skip to content

Commit

Permalink
code cleanup and logging improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Jan 6, 2025
1 parent 5c1a4f7 commit c21ac6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Group getActiveGroup(final String groupUUID) {
} else {
final Group group = groupResult.get();
if (group.terminationTime != null) {
log.error("Group: {} is not active anymore. Skip caching", group);
log.error("Group: {} is not active anymore. Skip caching", group.name);
return null;
}
return group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,11 @@ public void clearGroupCache(final String groupUUID, final boolean fully) {

if (fully) {
final Group activeGroup = this.proctoringCacheService.getActiveGroup(groupUUID);
this.proctoringCacheService
.getLiveSessionTokens(activeGroup.uuid)
.forEach(this.proctoringCacheService::evictSession);
if (activeGroup != null) {
this.proctoringCacheService
.getLiveSessionTokens(activeGroup.uuid)
.forEach(this.proctoringCacheService::evictSession);
}
}
this.proctoringCacheService.evictGroup(groupUUID);
}
Expand Down

0 comments on commit c21ac6b

Please sign in to comment.