private void beforePipelineExecution(final BeforePipelineExecutionEvent bpee, final TaskEntry taskEntry) { taskEntry.getTask().setPipelineStatus(PipelineExecutorTask.Status.RUNNING); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
/** * Executes the task definition in asynchronous mode. * @param taskDef task definition for executing. * @return the taskId assigned to the running task. * @see PipelineExecutorTaskDef */ private synchronized String executeAsync(final PipelineExecutorTaskDef taskDef) { final PipelineExecutorTaskImpl task = taskManagerHelper.createTask(taskDef); storeTaskEntry(TaskEntry.newAsyncEntry(task)); startAsyncTask(task); updateExecutorRegistry(task); return task.getId(); }
@Override public String execute(final PipelineExecutorTaskDef taskDef, final ExecutionMode executionMode) { if (executionMode == ExecutionMode.ASYNCHRONOUS) { return executeAsync(taskDef); } else { return executeSync(taskDef); } }
private void afterStageExecution(final AfterStageExecutionEvent asee, final TaskEntry taskEntry) { taskEntry.getTask().setStageStatus(asee.getStage().getName(), PipelineExecutorTask.Status.FINISHED); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
private void verifyInternalTask(PipelineExecutorTaskManagerImpl.TaskEntry taskEntry, boolean isAsync) { //verify that the generated internal task has the expect settings assertNotNull(taskEntry); assertEquals(TASK_ID, taskEntry.getTask().getId()); assertEquals(taskDef, taskEntry.getTask().getTaskDef()); assertEquals(isAsync, taskEntry.isAsync()); } }
public PipelineExecutorTaskImpl createTask(final PipelineExecutorTaskDef taskDef) { String executionId = generateTaskId(); return createTask(taskDef, executionId); }
@Test public void testCreateExecutorServiceWithDefaultValue() { //verify the creation when the THREAD_POOL_SIZE_PROPERTY_NAME property was not set. //The by default value must be used. ExecutorService executorService = taskManagerHelper.createExecutorService(); verifyExecutorServiceAndDestroy(executorService, PipelineExecutorTaskManagerImpl.DEFAULT_THREAD_POOL_SIZE); }
public PipelineExecutorTaskImpl createTask(final PipelineExecutorTaskDef taskDef, final String executionId) { PipelineExecutorTaskImpl task = new PipelineExecutorTaskImpl(taskDef, executionId); return task; }
private void notifyExternalListeners(final PipelineEvent event) { taskManagerHelper.notifyExternalListeners(externalListeners, event); }
private void beforePipelineExecution(final BeforePipelineExecutionEvent bpee, final TaskEntry taskEntry) { taskEntry.getTask().setPipelineStatus(PipelineExecutorTask.Status.RUNNING); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
private void beforeStageExecution(final BeforeStageExecutionEvent bsee, final TaskEntry taskEntry) { taskEntry.getTask().setStageStatus(bsee.getStage().getName(), PipelineExecutorTask.Status.RUNNING); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
/** * Executes the task definition in asynchronous mode. * @param taskDef task definition for executing. * @return the taskId assigned to the running task. * @see PipelineExecutorTaskDef */ private synchronized String executeAsync(final PipelineExecutorTaskDef taskDef) { final PipelineExecutorTaskImpl task = taskManagerHelper.createTask(taskDef); storeTaskEntry(TaskEntry.newAsyncEntry(task)); startAsyncTask(task); updateExecutorRegistry(task); return task.getId(); }
public PipelineExecutorTaskImpl createTask(final PipelineExecutorTaskDef taskDef) { String executionId = generateTaskId(); return createTask(taskDef, executionId); }
@Test public void testCreateExecutorServiceWithDefaultValue() { //verify the creation when the THREAD_POOL_SIZE_PROPERTY_NAME property was not set. //The by default value must be used. ExecutorService executorService = taskManagerHelper.createExecutorService(); verifyExecutorServiceAndDestroy(executorService, PipelineExecutorTaskManagerImpl.DEFAULT_THREAD_POOL_SIZE); }
@Override public String execute(final PipelineExecutorTaskDef taskDef, final ExecutionMode executionMode) { if (executionMode == ExecutionMode.ASYNCHRONOUS) { return executeAsync(taskDef); } else { return executeSync(taskDef); } }
public PipelineExecutorTaskImpl createTask(final PipelineExecutorTaskDef taskDef, final String executionId) { PipelineExecutorTaskImpl task = new PipelineExecutorTaskImpl(taskDef, executionId); return task; }
private void notifyExternalListeners(final PipelineEvent event) { taskManagerHelper.notifyExternalListeners(externalListeners, event); }
private void afterPipelineExecution(final AfterPipelineExecutionEvent apee, final TaskEntry taskEntry) { taskEntry.getTask().setPipelineStatus(PipelineExecutorTask.Status.FINISHED); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
private void beforeStageExecution(final BeforeStageExecutionEvent bsee, final TaskEntry taskEntry) { taskEntry.getTask().setStageStatus(bsee.getStage().getName(), PipelineExecutorTask.Status.RUNNING); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }
private void afterPipelineExecution(final AfterPipelineExecutionEvent apee, final TaskEntry taskEntry) { taskEntry.getTask().setPipelineStatus(PipelineExecutorTask.Status.FINISHED); if (taskEntry.isAsync()) { updateExecutorRegistry(taskEntry.getTask()); } }