diff --git a/api/src/main/java/ca/bc/gov/educ/api/edx/controller/v1/EdxSagaController.java b/api/src/main/java/ca/bc/gov/educ/api/edx/controller/v1/EdxSagaController.java index ebf48655..f0ebc55b 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/edx/controller/v1/EdxSagaController.java +++ b/api/src/main/java/ca/bc/gov/educ/api/edx/controller/v1/EdxSagaController.java @@ -139,8 +139,8 @@ public ResponseEntity moveSchool(MoveSchoolData moveSchoolData) { public OnboardingFileProcessResponse processOnboardingFile(OnboardingFileUpload fileUpload) { List sagaEntities = this.edxFileOnboardingService.processOnboardingFile(Base64.getDecoder().decode(fileUpload.getFileContents()), fileUpload.getCreateUser()); log.info("Number of onboarded sagas stored is: " + sagaEntities.size()); - List first10Sagas = sagaEntities.stream().limit(10).toList(); - first10Sagas.forEach(sagaEntity -> startServicesSaga(sagaEntity.getSagaName().equals(ONBOARD_SCHOOL_USER_SAGA.toString()) ? ONBOARD_SCHOOL_USER_SAGA : ONBOARD_DISTRICT_USER_SAGA, sagaEntity)); + List first100Sagas = sagaEntities.stream().limit(100).toList(); + first100Sagas.forEach(sagaEntity -> startServicesSaga(sagaEntity.getSagaName().equals(ONBOARD_SCHOOL_USER_SAGA.toString()) ? ONBOARD_SCHOOL_USER_SAGA : ONBOARD_DISTRICT_USER_SAGA, sagaEntity)); OnboardingFileProcessResponse response = new OnboardingFileProcessResponse(); response.setProcessedCount(Integer.toString(sagaEntities.size())); return response; diff --git a/api/src/main/java/ca/bc/gov/educ/api/edx/repository/SagaRepository.java b/api/src/main/java/ca/bc/gov/educ/api/edx/repository/SagaRepository.java index c5b0f4dc..3f37da90 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/edx/repository/SagaRepository.java +++ b/api/src/main/java/ca/bc/gov/educ/api/edx/repository/SagaRepository.java @@ -23,7 +23,7 @@ public interface SagaRepository extends JpaRepository { * @param statuses the statuses * @return the list */ - List findTop10ByStatusInOrderByCreateDate(List statuses); + List findTop100ByStatusInOrderByCreateDate(List statuses); /** * Find all by create date before list. diff --git a/api/src/main/java/ca/bc/gov/educ/api/edx/schedulers/EventTaskScheduler.java b/api/src/main/java/ca/bc/gov/educ/api/edx/schedulers/EventTaskScheduler.java index 45d5adb8..53291233 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/edx/schedulers/EventTaskScheduler.java +++ b/api/src/main/java/ca/bc/gov/educ/api/edx/schedulers/EventTaskScheduler.java @@ -59,7 +59,7 @@ public EventTaskScheduler(final SagaRepository sagaRepository, final List sagas = this.getSagaRepository().findTop10ByStatusInOrderByCreateDate(this.getStatusFilters()); + final List sagas = this.getSagaRepository().findTop100ByStatusInOrderByCreateDate(this.getStatusFilters()); if (!sagas.isEmpty()) { this.processUncompletedSagas(sagas); }