Revision 51525
Added by Panagiotis Kanakakis about 6 years ago
MonitorApiImpl.java | ||
---|---|---|
50 | 50 |
LOGGER.debug("Getting jobs of user : " + user); |
51 | 51 |
LOGGER.debug(user + "/" + jobType + "/" + offset + "/" + dateFrom + "/" + dateTo + "/" + validationStatus + "/" + includeJobsTotal); |
52 | 52 |
JobsOfUser retJobs = new JobsOfUser(); |
53 |
LOGGER.debug("Size of jobs list -> " + getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset), |
|
54 |
Integer.parseInt(limit), dateFrom, dateTo, validationStatus).size()); |
|
55 | 53 |
retJobs.setJobs(getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset), |
56 | 54 |
Integer.parseInt(limit), dateFrom, dateTo, validationStatus)); |
57 | 55 |
if (Boolean.parseBoolean(includeJobsTotal)) { |
... | ... | |
62 | 60 |
} |
63 | 61 |
|
64 | 62 |
//TODO fix status with new validator version |
65 |
for(StoredJob job :retJobs.getJobs()){ |
|
66 |
if (job.getContentJobStatus().equals("ongoing") || job.getUsageJobStatus().equals("ongoing")) { |
|
67 |
job.setValidationStatus("ongoing"); |
|
68 |
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && job.getContentJobScore() > 50 && job.getUsageJobScore() > 50) |
|
69 |
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() > 50) |
|
70 |
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() > 50)) { |
|
71 |
job.setValidationStatus("successful"); |
|
72 |
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && (job.getContentJobScore() <= 50 || job.getUsageJobScore() <= 50)) |
|
73 |
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() <= 50) |
|
74 |
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() <= 50) ) { |
|
75 |
job.setValidationStatus("failed"); |
|
63 |
if(retJobs.getJobs() != null){ |
|
64 |
for(StoredJob job :retJobs.getJobs()){ |
|
65 |
if (job.getContentJobStatus().equals("ongoing") || job.getUsageJobStatus().equals("ongoing")) { |
|
66 |
job.setValidationStatus("ongoing"); |
|
67 |
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && job.getContentJobScore() > 50 && job.getUsageJobScore() > 50) |
|
68 |
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() > 50) |
|
69 |
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() > 50)) { |
|
70 |
job.setValidationStatus("successful"); |
|
71 |
} else if ((job.getValidationType().equals("CU") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("finished") && (job.getContentJobScore() <= 50 || job.getUsageJobScore() <= 50)) |
|
72 |
|| (job.getValidationType().equals("C") && job.getContentJobStatus().equals("finished") && job.getUsageJobStatus().equals("none") && job.getContentJobScore() <= 50) |
|
73 |
|| (job.getValidationType().equals("U") && job.getContentJobStatus().equals("none") && job.getUsageJobStatus().equals("finished") && job.getUsageJobScore() <= 50) ) { |
|
74 |
job.setValidationStatus("failed"); |
|
75 |
} |
|
76 |
|
|
76 | 77 |
} |
77 |
|
|
78 | 78 |
} |
79 | 79 |
|
80 |
|
|
80 | 81 |
return retJobs; |
81 | 82 |
|
82 | 83 |
} |
Also available in: Unified diff
1. Add roles for aai
2. Changes on converter file for new interface object
3. Move emailUtils to avoid bug on bean definitions
4. Add openaire provider authorities mapper class
5. Bug fixes on controllers