Tested in big data set

This commit is contained in:
Filip Izydorczyk
2021-01-03 17:57:32 +01:00
parent 95cc34c676
commit 44f8c610d9
3 changed files with 20 additions and 9 deletions

View File

@ -89,13 +89,13 @@ public class AssignmentService {
final Groups group = a.getGroup();
if (group.getCapacity() > group.getRegisteredStudents().size()) {
e.claimGroup(group);
this.userService.save(e);
accepted.add(group);
} else {
removed.add(group);
}
});
}
this.userService.save(e);
this.emailService.sendAcceptationResult(e, new EmailAcceptedData(accepted, removed));
});
}

View File

@ -154,6 +154,10 @@ public class UserService {
return this.repo.getAllByRole(UserRoles.ADMIN).size() > 0;
}
public void saveAll(List<User> users) {
this.repo.saveAll(users);
}
/**
* get students sorted by their ranking
*