Skip to content

Commit

Permalink
Update ExaminationsConsistencyChecker.java
Browse files Browse the repository at this point in the history
works
  • Loading branch information
michaelkain committed Mar 11, 2024
1 parent 0ec62f3 commit 1ff787f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void check() {
return;
}
try {
LOG.info("ExaminationsConsistencyChecker START...");
LOG.info("START...");
List<Examination> examinationsToCheck;
LatestCheckedExamination latestCheckedExamination =
latestCheckedExaminationRepository.findTopByOrderByIdDesc().orElse(null);
Expand All @@ -92,9 +92,9 @@ public void check() {
examinationsToCheck = examinationRepository.findAll();
}
checkExaminations(examinationsToCheck, latestCheckedExamination);
LOG.info("ExaminationsConsistencyChecker STOP...");
LOG.info("STOP...");
} catch(Exception e) {
LOG.info("ExaminationsConsistencyChecker STOPPED with exception...");
LOG.info("STOPPED with exception...");
LOG.error(e.getMessage(), e);
} finally {
isTaskRunning.set(false);
Expand All @@ -107,7 +107,7 @@ private void checkExaminations(List<Examination> examinationsToCheck,
File datasetsLogFile = new File(loggingFileName);
if (datasetsLogFile.exists()) {
File parent = datasetsLogFile.getParentFile();
File csvFile = new File(parent.getAbsolutePath() + File.pathSeparator + ECC + examinationsToCheck.get(0).getId() + CSV);
File csvFile = new File(parent.getAbsolutePath() + File.separator + ECC + examinationsToCheck.get(0).getId() + CSV);
if (csvFile.createNewFile()) {
try (CSVWriter writer = new CSVWriter(new FileWriter(csvFile))) {
for (Examination examination : examinationsToCheck) {
Expand All @@ -119,7 +119,7 @@ private void checkExaminations(List<Examination> examinationsToCheck,
}
}
} else {
LOG.info("ExaminationsConsistencyChecker : no new examinations found.");
LOG.info("No new examinations found.");
}
}

Expand Down

0 comments on commit 1ff787f

Please sign in to comment.