Skip to content

Commit 494c15c

Browse files
Merge pull request #595 from bcgov/fix/GRAD2-2690
Update to job status - rollback for yearend status update.
2 parents 2aa0573 + 9b22cab commit 494c15c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/DistributionRunYearlyCompletionNotificationListener.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,8 @@ public void afterJob(JobExecution jobExecution) {
5757
}
5858

5959
DistributionResponse distResponse = processGlobalList(summaryDTO, searchRequest, "YEARENDDIST");
60-
String processGlobalListStatus = STARTED.name();
61-
if(distResponse != null && FAILED.name().equalsIgnoreCase(distResponse.getMergeProcessResponse())) {
62-
processGlobalListStatus = FAILED.name();
63-
} else {
64-
processGlobalListStatus = COMPLETED.name();
65-
}
60+
String processGlobalListStatus = distResponse != null ? (FAILED.name().equalsIgnoreCase(distResponse.getMergeProcessResponse()) ? FAILED.name(): STARTED.name()) : COMPLETED.name();
61+
6662
String studentSearchRequest = jobParameters.getString(SEARCH_REQUEST, "{}");
6763
// display Summary Details
6864
LOGGER.info("Records read : {}", summaryDTO.getReadCount());

0 commit comments

Comments
 (0)