Skip to content

Commit

Permalink
GRAD2-2322
Browse files Browse the repository at this point in the history
School Reports Archive Process: Backend endpoints and Processing To Complete
  • Loading branch information
arybakov-cgi committed Jul 18, 2024
1 parent 29f1810 commit f382092
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ public Step archiveStudentsJobStep(JobRepository jobRepository, PlatformTransact
}

@Bean
public Step masterStepArchiveStudents(JobRepository jobRepository, PlatformTransactionManager transactionManager, EducGradBatchGraduationApiConstants constants) {
return new StepBuilder("masterStepArchiveStudents", jobRepository)
.partitioner("archiveSchoolReportsPartitioner", partitionerArchiveStudents())
public Step masterStepArchiveSchoolReports(JobRepository jobRepository, PlatformTransactionManager transactionManager, EducGradBatchGraduationApiConstants constants) {
return new StepBuilder("masterStepArchiveSchoolReports", jobRepository)
.partitioner("archiveSchoolReportsPartitioner", partitionerArchiveSchooReports())
.step(archiveSchoolReportsJobStep(jobRepository, transactionManager, constants))
.gridSize(constants.getNumberOfPartitions())
.taskExecutor(taskExecutor())
Expand Down Expand Up @@ -188,7 +188,7 @@ public RegGradAlgPartitioner partitionerRegGrad() {

@Bean
@StepScope
public ArchiveSchoolReportsPartitioner partitionerArchiveStudents() {
public ArchiveSchoolReportsPartitioner partitionerArchiveSchooReports() {
return new ArchiveSchoolReportsPartitioner();
}

Expand Down Expand Up @@ -1116,7 +1116,7 @@ public Job archiveSchoolReportsBatchJob(JobRepository jobRepository, PlatformTra
return new JobBuilder("archiveSchoolReportsBatchJob", jobRepository)
.incrementer(new RunIdIncrementer())
.listener(listener)
.start(masterStepArchiveStudents(jobRepository, transactionManager, constants))
.start(masterStepArchiveSchoolReports(jobRepository, transactionManager, constants))
.on("*")
.end().build()
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void afterJob(JobExecution jobExecution) {
ExecutionContext jobContext = jobExecution.getExecutionContext();
Long jobExecutionId = jobExecution.getId();
String jobType = jobParameters.getString("jobType");
LOGGER.info("{} Archive Students Job {} completed in {} s with jobExecution status {}", jobType, jobExecutionId, elapsedTimeMillis / 1000, jobExecution.getStatus());
LOGGER.info("{} Archive School Reports Job {} completed in {} s with jobExecution status {}", jobType, jobExecutionId, elapsedTimeMillis / 1000, jobExecution.getStatus());

String status = jobExecution.getStatus().toString();
Date startTime = DateUtils.toDate(jobExecution.getStartTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ public void testArchiveSchoolReportsBatchJob() {
ThreadLocalStateUtil.setCurrentUser("Batch Process");
StudentSearchRequest request = new StudentSearchRequest();
request.setSchoolOfRecords(List.of("12345678"));
request.setReportTypes(List.of("NONGRADREG"));

String searchData = jsonTransformer.marshall(request);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ public void testGetTotalSchoolReportsForArchiving() {
}

@Test
public void testGetTotalStudentsForArchivingError() {
public void testGetTotalSchoolReportsForArchivingError() {
List<String> schools = Arrays.asList("12345678","11223344");

mockTokenResponseObject();
Expand Down

0 comments on commit f382092

Please sign in to comment.