Skip to content

Commit

Permalink
more logging for groups
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoepfl committed Feb 28, 2024
1 parent 7c4d99b commit 5590fbc
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,9 @@ public int upsertAllGroups(int startIndex, int maxResults) {

Set<GroupEntity> entities = directoryBackend.getAllGroups(startIndex, maxResults);

int counter = 0;
for (Iterator<GroupEntity> i = entities.iterator(); i.hasNext(); ) {

GroupEntity entity = i.next();
if ((((counter/2000)*2000)==counter) || (counter == entities.size()-1)) {
logger.info("Inserting group {} {}", entity.getId(), entity.getName());
}
++counter;
entities.forEach(entity -> {

logger.info("{}", entity.getId());
QueryDefFactory factory = getCurrentQueryDefFactory();

factory
Expand All @@ -342,7 +336,7 @@ public int upsertAllGroups(int startIndex, int maxResults) {
.on("name", entity.getName())
.on("description", Optional.ofNullable(entity.getDescription()))
.execute(IgnoredResult.class);
};
});

return entities.size();
}
Expand Down

0 comments on commit 5590fbc

Please sign in to comment.