public void addJob(AbstractExecutable executable) { try { executable.initConfig(config); if (executableDao.getJob(executable.getId()) != null) { throw new IllegalArgumentException("job id:" + executable.getId() + " already exists"); } addJobOutput(executable); executableDao.addJob(parse(executable)); } catch (PersistentException e) { logger.error("fail to submit job:" + executable.getId(), e); throw new RuntimeException(e); } }
private void addJobOutput(AbstractExecutable executable) throws PersistentException { ExecutableOutputPO executableOutputPO = new ExecutableOutputPO(); executableOutputPO.setUuid(executable.getId()); executableDao.addJobOutput(executableOutputPO); if (executable instanceof DefaultChainedExecutable) { for (AbstractExecutable subTask : ((DefaultChainedExecutable) executable).getTasks()) { addJobOutput(subTask); } } }
public void addJob(AbstractExecutable executable) { try { executable.initConfig(config); if (executableDao.getJob(executable.getId()) != null) { throw new IllegalArgumentException("job id:" + executable.getId() + " already exists"); } addJobOutput(executable); executableDao.addJob(parse(executable)); } catch (PersistentException e) { logger.error("fail to submit job:" + executable.getId(), e); throw new RuntimeException(e); } }
private void addJobOutput(AbstractExecutable executable) throws PersistentException { ExecutableOutputPO executableOutputPO = new ExecutableOutputPO(); executableOutputPO.setUuid(executable.getId()); executableDao.addJobOutput(executableOutputPO); if (executable instanceof DefaultChainedExecutable) { for (AbstractExecutable subTask : ((DefaultChainedExecutable) executable).getTasks()) { addJobOutput(subTask); } } }