if (isDiscarded()) { setEndTime(System.currentTimeMillis()); notifyUserStatusChange(ExecutableState.DISCARDED); } else if (result.succeed()) { List<? extends Executable> jobs = getTasks(); setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.SUCCEED, null, null); notifyUserStatusChange(ExecutableState.SUCCEED); } else if (hasError) { setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.ERROR, null, null); notifyUserStatusChange(ExecutableState.ERROR); } else { jobService.updateJobOutput(getId(), ExecutableState.READY, null, null); setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.ERROR, null, null); notifyUserStatusChange(ExecutableState.ERROR);
if (isDiscarded()) { setEndTime(System.currentTimeMillis()); notifyUserStatusChange(ExecutableState.DISCARDED); } else if (result.succeed()) { List<? extends Executable> jobs = getTasks(); setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.SUCCEED, null, null); notifyUserStatusChange(ExecutableState.SUCCEED); } else if (hasError) { setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.ERROR, null, null); notifyUserStatusChange(ExecutableState.ERROR); } else { jobService.updateJobOutput(getId(), ExecutableState.READY, null, null); setEndTime(System.currentTimeMillis()); jobService.updateJobOutput(getId(), ExecutableState.ERROR, null, null); notifyUserStatusChange(ExecutableState.ERROR);