agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/AbstractJobLauncher.java
/**
     * Saves or updates a {@link TransferTask} object, updating timestamps based on status.
     *
     * @param transferTask the object to save
     * @erturns the updated {@link TransferTask}
     * @throws TransferException if the sql operation failed.
     */
Saves or updates a  TransferTask object, updating timestamps based on status.
@param transferTask the object to save
@erturns the updated  TransferTask
@throws TransferException if the sql operation failed.
Saves or updates a TransferTask object updating timestamps based on status . @param transferTask the object to save @erturns the updated TransferTask @throws TransferException if the sql operation failed .
protected TransferTask updateTransferTask(TransferTask transferTask) throws TransferException {
        Date currentTime = Date.from(Instant.now());
        transferTask.setLastUpdated(currentTime);
        if (!TransferStatusType.getActiveStatusValues().contains(transferTask.getStatus())) {
            if (transferTask.getEndTime() == null) {
                transferTask.setEndTime(currentTime);
            }
            transferTask.updateTransferRate();
        } else if (transferTask.getStatus() == TransferStatusType.TRANSFERRING) {
            if (transferTask.getStartTime() == null) {
                transferTask.setStartTime(currentTime);
            }
        }
        TransferTaskDao.persist(transferTask);
        return transferTask;
    }
protected TransferTask updateTransferTask ( TransferTask transferTask ) throws TransferException { Date currentTime = Date . from ( Instant . now ( ) ) ; transferTask . setLastUpdated ( currentTime ) ; if ( ! TransferStatusType . getActiveStatusValues ( ) . contains ( transferTask . getStatus ( ) ) ) { if ( transferTask . getEndTime ( ) == null ) { transferTask . setEndTime ( currentTime ) ; } transferTask . updateTransferRate ( ) ; } else if ( transferTask . getStatus ( ) == TransferStatusType . TRANSFERRING ) { if ( transferTask . getStartTime ( ) == null ) { transferTask . setStartTime ( currentTime ) ; } } TransferTaskDao . persist ( transferTask ) ; return transferTask ; }
Saves or updates a {@link TransferTask} object, updating timestamps based on status.
Saves or updates a { @link TransferTask } object updating timestamps based on status .