Skip to content

Commit

Permalink
Merge branch 'main' into grad-release
Browse files Browse the repository at this point in the history
  • Loading branch information
chris.ditcher authored and chris.ditcher committed Aug 29, 2023
2 parents e7b03fe + 4530fe4 commit 06b1d27
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-student-api</artifactId>
<version>1.8.42</version>
<version>1.8.44</version>
<name>educ-grad-student-api</name>
<description>Student Demographics API for GRAD team</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ private List<ReportGradStudentData> createAndExecuteReportGradStudentDataTasks(S
tasks.add(pageTask);
}

processReportGradStudentDataTasksAsync(tasks, result, totalNumberOfPages);
processReportGradStudentDataTasksAsync(tasks, result);
}
logger.debug("Completed in {} sec, total objects acquired {}", (System.currentTimeMillis() - startTime) / 1000, result.size());
return result;
}

@Generated
private void processReportGradStudentDataTasksAsync(List<Callable<Object>> tasks, List<ReportGradStudentData> result, int numberOfThreads) {
private void processReportGradStudentDataTasksAsync(List<Callable<Object>> tasks, List<ReportGradStudentData> result) {
if(tasks.isEmpty()) return;
List<Future<Object>> executionResult;
ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads);
ExecutorService executorService = Executors.newWorkStealingPool();
try {
executionResult = executorService.invokeAll(tasks);
for (Future<?> f : executionResult) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,16 +1038,16 @@ private List<UUID> processStudentDataList(Page<UUID> studentGuids) {
tasks.add(pageTask);
}

processUUIDDataTasksAsync(tasks, result, totalNumberOfPages);
processUUIDDataTasksAsync(tasks, result);
}
logger.debug("Completed in {} sec, total objects aquared {}", (System.currentTimeMillis() - startTime) / 1000, result.size());
return result;
}

private void processUUIDDataTasksAsync(List<Callable<Object>> tasks, List<UUID> result, int totalNumberOfPages) {
private void processUUIDDataTasksAsync(List<Callable<Object>> tasks, List<UUID> result) {
if(tasks.isEmpty()) return;
List<Future<Object>> executionResult;
ExecutorService executorService = Executors.newFixedThreadPool(totalNumberOfPages);
ExecutorService executorService = Executors.newWorkStealingPool();
try {
executionResult = executorService.invokeAll(tasks);
for (Future<?> f : executionResult) {
Expand Down

0 comments on commit 06b1d27

Please sign in to comment.