Ejemplo n.º 1
0
 public void updateErrorStatus(Exception e) {
   String oldStatus = curJob.getStatus();
   this.curJob.setStatus(JobBuilderController.STATUS_ERROR);
   jobManager.saveJob(curJob);
   jobManager.createJobAuditTrail(oldStatus, curJob, e);
   vglJobStatusChangeHandler.handleStatusChange(curJob, curJob.getStatus(), oldStatus);
 }
Ejemplo n.º 2
0
 @Override
 public boolean run() throws PortalServiceException {
   String instanceId;
   try {
     instanceId = cloudComputeService.executeJob(curJob, userDataString);
     logger.info("Launched instance: " + instanceId);
     // set reference as instanceId for use when killing a job
     curJob.setComputeInstanceId(instanceId);
     curJob.setStatus(JobBuilderController.STATUS_PENDING);
     jobManager.createJobAuditTrail(JobBuilderController.STATUS_INQUEUE, curJob, "Job submitted.");
     curJob.setSubmitDate(new Date());
     jobManager.saveJob(curJob);
     return true;
   } catch (PortalServiceException e) {
     throw e;
   }
 }