response.put("msg", "missing project metadata for graph '" + graphId + "'");
tx.rollback();
return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
}
JobMetadata jobMetadata = tx.createJob(projectMetadata);
response.put("status", "ok");
response.put("msg", "job submitted");
response.put("jobId", jobMetadata.getId().toString());
tx.commit();
// We can't pass the values directly because they'll live in a separate thread.
pageRankService.run(graph, jobMetadata.getId(), item.getAlpha());
return new ResponseEntity<>(response, HttpStatus.OK);
}