StatusPageResponse response = RetrieverUtils.getStatuspage(jobReference
.getUrl() + "api/json");
if (response.getHttpStatusCode() != 200) {
return;
}
Job job = mapper.readValue(response.getPageContent(), Job.class);
job.setCode(code);
List<Job> jobs = jobsCache.putIfAbsent(project, new ArrayList<Job>());
if (jobs == null)
jobs = jobsCache.get(project);
for (Job job2 : jobs) {
if (job2.getName().equals(job.getName())) {
jobs.remove(job2);
break;
}
}
jobs.add(job);