fixed sorting of jobs

This commit is contained in:
Konstantinos Spyrou 2024-09-05 14:34:55 +03:00
parent b42f7585f6
commit 77437fa03c
1 changed files with 2 additions and 1 deletions

View File

@ -124,6 +124,7 @@ public class MonitorServiceImpl implements MonitorService {
if (retJobs.getJobs() != null) {
jobs.addAll(retJobs.getJobs());
}
jobs.sort((s1, s2) -> s2.getStarted().compareTo(s1.getStarted()));
// set all jobs back to retJobs
retJobs.setJobs(jobs);
}
@ -170,7 +171,7 @@ public class MonitorServiceImpl implements MonitorService {
try {
job = getValidationService().getStoredJob(Integer.parseInt(jobId), groupBy);
} catch (Exception e) {
logger.error(e.getMessage(), e);
logger.warn("Job with id '{}' not found in Validator. Trying CRIS...", jobId, e);
}
/////////////////////////////////////////////////////////////////////////////////////////
// FIXME: this is a hack for CRIS Jan Dvorak Validator, should be implemented properly //