agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/queue/AbstractJobWatch.java
/**
     * Convenience method to update job status and update the class-local variable. Any {@link JobException} are
     * logged and swallowed to allow for cleaner code. Hibernate runtime exceptions are still thrown as they are
     * RunTimeExceptions.
     *
     * @param jobStatusType the new job status
     * @param message       the job event message for the update event
     * @throws org.hibernate.StaleStateException if the local job is out of sync with the db and cannot be updated. This
     *                                           can happen when two tasks compete for the same job. Only one can update the db to claim the task.
     */
Convenience method to update job status and update the class-local variable. Any  JobException are
logged and swallowed to allow for cleaner code. Hibernate runtime exceptions are still thrown as they are
RunTimeExceptions.

@param jobStatusType the new job status
@param message       the job event message for the update event
@throws org.hibernate.StaleStateException if the local job is out of sync with the db and cannot be updated. This
can happen when two tasks compete for the same job. Only one can update the db to claim the task.
Convenience method to update job status and update the class - local variable . Any JobException are logged and swallowed to allow for cleaner code . Hibernate runtime exceptions are still thrown as they are RunTimeExceptions . @param jobStatusType the new job status @param message the job event message for the update event @throws org . hibernate . StaleStateException if the local job is out of sync with the db and cannot be updated . This can happen when two tasks compete for the same job . Only one can update the db to claim the task .
protected void updateJobStatus(JobStatusType jobStatusType, String message) {
        try {
            setJob(JobManager.updateStatus(getJob(), jobStatusType, message));
        } catch (JobException e) {
            log.error("Failed to update job " + getJob().getUuid() + " status to " + jobStatusType.name());
        } catch (Throwable t) {
            log.error("Failed to update job " + getJob().getUuid() + " status to " + jobStatusType.name());
            throw t;
        }
    }
protected void updateJobStatus ( JobStatusType jobStatusType , String message ) { try { setJob ( JobManager . updateStatus ( getJob ( ) , jobStatusType , message ) ) ; } catch ( JobException e ) { log . error ( "Failed to update job " + getJob ( ) . getUuid ( ) + " status to " + jobStatusType . name ( ) ) ; } catch ( Throwable t ) { log . error ( "Failed to update job " + getJob ( ) . getUuid ( ) + " status to " + jobStatusType . name ( ) ) ; throw t ; } }
Convenience method to update job status and update the class-local variable.
Convenience method to update job status and update the class - local variable .