agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/JobManager.java
/**
     * Updates the status of a job, its timestamps, and writes a new
     * JobEvent to the job's history with the given status and message.
     *
     * @param job the job to update
     * @param status the status to assign to the job
     * @param eventMessage the message to use in the resulting {@link JobEvent}
     * @return Updated job object
     * @throws JobException if the update was unable to complete
     * @throws StaleStateException when a concurrency issue prevents the job update
     */
Updates the status of a job, its timestamps, and writes a new
JobEvent to the job's history with the given status and message.


Updates the status of a job its timestamps and writes a new JobEvent to the job ' s history with the given status and message .
public static Job updateStatus(Job job, JobStatusType status, String eventMessage) throws JobException {
        job.setStatus(status, eventMessage);
        Date date = new DateTime().toDate();
        job.setLastUpdated(date);
        if (status.equals(JobStatusType.QUEUED)) {
            if (job.getSubmitTime() == null) {
                job.setSubmitTime(new DateTime().toDate());
            }
        } else if (status.equals(JobStatusType.RUNNING)) {
            if (job.getStartTime() == null) {
                job.setStartTime(new DateTime().toDate());
            }
        } else if (status.equals(JobStatusType.FINISHED)
                || status.equals(JobStatusType.KILLED)
                || status.equals(JobStatusType.STOPPED)
                || status.equals(JobStatusType.FAILED)) {
            if (job.getEndTime() == null) {
                job.setEndTime(new DateTime().toDate());
            }
        } else if (status.equals(JobStatusType.STAGED)) {
        }
        JobDao.persist(job, false);
        return job;
    }
public static Job updateStatus ( Job job , JobStatusType status , String eventMessage ) throws JobException { job . setStatus ( status , eventMessage ) ; Date date = new DateTime ( ) . toDate ( ) ; job . setLastUpdated ( date ) ; if ( status . equals ( JobStatusType . QUEUED ) ) { if ( job . getSubmitTime ( ) == null ) { job . setSubmitTime ( new DateTime ( ) . toDate ( ) ) ; } } else if ( status . equals ( JobStatusType . RUNNING ) ) { if ( job . getStartTime ( ) == null ) { job . setStartTime ( new DateTime ( ) . toDate ( ) ) ; } } else if ( status . equals ( JobStatusType . FINISHED ) || status . equals ( JobStatusType . KILLED ) || status . equals ( JobStatusType . STOPPED ) || status . equals ( JobStatusType . FAILED ) ) { if ( job . getEndTime ( ) == null ) { job . setEndTime ( new DateTime ( ) . toDate ( ) ) ; } } else if ( status . equals ( JobStatusType . STAGED ) ) { } JobDao . persist ( job , false ) ; return job ; }
Updates the status of a job, its timestamps, and writes a new
 JobEvent to the job's history with the given status and message.
Updates the status of a job its timestamps and writes a new JobEvent to the job ' s history with the given status and message .
// nothing to do here?