本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.isExecuted()
方法的一些代码示例,展示了Task.isExecuted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.isExecuted()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:isExecuted
暂无
代码示例来源:origin: Netflix/conductor
public DeciderOutcome decide(Workflow workflow) throws TerminateWorkflowException {
//In case of a new workflow the list of tasks will be empty
final List<Task> tasks = workflow.getTasks();
//In case of a new workflow the list of executedTasks will also be empty
List<Task> executedTasks = tasks.stream()
.filter(t -> !t.getStatus().equals(SKIPPED) && !t.getStatus().equals(READY_FOR_RERUN) && !t.isExecuted())
.collect(Collectors.toList());
List<Task> tasksToBeScheduled = new LinkedList<>();
if (executedTasks.isEmpty()) {
//this is the flow that the new workflow will go through
tasksToBeScheduled = startWorkflow(workflow);
if (tasksToBeScheduled == null) {
tasksToBeScheduled = new LinkedList<>();
}
}
return decide(workflow, tasksToBeScheduled);
}
代码示例来源:origin: Netflix/conductor
if (!pendingTask.isExecuted() && !pendingTask.isRetried() && pendingTask.getStatus().isTerminal()) {
pendingTask.setExecuted(true);
List<Task> nextTasks = getNextTask(workflow, pendingTask);
代码示例来源:origin: Netflix/conductor
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
isRetried() == task.isRetried() &&
isExecuted() == task.isExecuted() &&
isCallbackFromWorker() == task.isCallbackFromWorker() &&
getResponseTimeoutSeconds() == task.getResponseTimeoutSeconds() &&
代码示例来源:origin: Netflix/conductor
@Override
public int hashCode() {
return Objects.hash(getTaskType(), getStatus(), getInputData(), getReferenceTaskName(), getRetryCount(), getSeq(), getCorrelationId(), getPollCount(), getTaskDefName(), getScheduledTime(), getStartTime(), getEndTime(), getUpdateTime(), getStartDelayInSeconds(), getRetriedTaskId(), isRetried(), isExecuted(), isCallbackFromWorker(), getResponseTimeoutSeconds(), getWorkflowInstanceId(), getWorkflowType(), getTaskId(), getReasonForIncompletion(), getCallbackAfterSeconds(), getWorkerId(), getOutputData(), getWorkflowTask(), getDomain(), getInputMessage(), getOutputMessage(), getRateLimitPerFrequency(), getRateLimitFrequencyInSeconds(), getExternalInputPayloadStoragePath(), getExternalOutputPayloadStoragePath());
}
}
代码示例来源:origin: Netflix/conductor
assertTrue(workflow.getTaskByRefName("s2").isExecuted());
assertFalse(workflow.getTaskByRefName("s2").isRetried());
assertEquals(1, deciderOutcome.tasksToBeUpdated.size());
代码示例来源:origin: Netflix/conductor
@Test
public void testDecideFailedTask() {
WorkflowDef workflowDef = createLinearWorkflow();
Workflow workflow = new Workflow();
workflow.setWorkflowDefinition(workflowDef);
workflow.setStatus(WorkflowStatus.RUNNING);
Task task = new Task();
task.setTaskType("junit_task_l1");
task.setReferenceTaskName("s1");
task.setSeq(1);
task.setRetried(false);
task.setExecuted(false);
task.setStatus(Status.FAILED);
WorkflowTask workflowTask = new WorkflowTask();
workflowTask.setTaskReferenceName("s1");
workflowTask.setName("junit_task_l1");
workflowTask.setTaskDefinition(new TaskDef("junit_task_l1"));
task.setWorkflowTask(workflowTask);
workflow.getTasks().add(task);
DeciderOutcome deciderOutcome = deciderService.decide(workflow);
assertNotNull(deciderOutcome);
assertFalse(workflow.getTaskByRefName("s1").isExecuted());
assertTrue(workflow.getTaskByRefName("s1").isRetried());
assertEquals(1, deciderOutcome.tasksToBeUpdated.size());
assertEquals("s1", deciderOutcome.tasksToBeUpdated.get(0).getReferenceTaskName());
assertEquals(1, deciderOutcome.tasksToBeScheduled.size());
assertEquals("s1", deciderOutcome.tasksToBeScheduled.get(0).getReferenceTaskName());
assertEquals(0, deciderOutcome.tasksToBeRequeued.size());
assertFalse(deciderOutcome.isComplete);
}
代码示例来源:origin: Netflix/conductor
to.setExecuted( from.isExecuted() );
to.setCallbackFromWorker( from.isCallbackFromWorker() );
to.setResponseTimeoutSeconds( from.getResponseTimeoutSeconds() );
代码示例来源:origin: com.netflix.conductor/conductor-core
public DeciderOutcome decide(Workflow workflow) throws TerminateWorkflowException {
//In case of a new workflow the list of tasks will be empty
final List<Task> tasks = workflow.getTasks();
//In case of a new workflow the list of executedTasks will also be empty
List<Task> executedTasks = tasks.stream()
.filter(t -> !t.getStatus().equals(SKIPPED) && !t.getStatus().equals(READY_FOR_RERUN) && !t.isExecuted())
.collect(Collectors.toList());
List<Task> tasksToBeScheduled = new LinkedList<>();
if (executedTasks.isEmpty()) {
//this is the flow that the new workflow will go through
tasksToBeScheduled = startWorkflow(workflow);
if (tasksToBeScheduled == null) {
tasksToBeScheduled = new LinkedList<>();
}
}
return decide(workflow, tasksToBeScheduled);
}
代码示例来源:origin: com.netflix.conductor/conductor-core
if (!pendingTask.isExecuted() && !pendingTask.isRetried() && pendingTask.getStatus().isTerminal()) {
pendingTask.setExecuted(true);
List<Task> nextTasks = getNextTask(workflow, pendingTask);
代码示例来源:origin: com.netflix.conductor/conductor-common
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
isRetried() == task.isRetried() &&
isExecuted() == task.isExecuted() &&
isCallbackFromWorker() == task.isCallbackFromWorker() &&
getResponseTimeoutSeconds() == task.getResponseTimeoutSeconds() &&
代码示例来源:origin: com.netflix.conductor/conductor-common
@Override
public int hashCode() {
return Objects.hash(getTaskType(), getStatus(), getInputData(), getReferenceTaskName(), getRetryCount(), getSeq(), getCorrelationId(), getPollCount(), getTaskDefName(), getScheduledTime(), getStartTime(), getEndTime(), getUpdateTime(), getStartDelayInSeconds(), getRetriedTaskId(), isRetried(), isExecuted(), isCallbackFromWorker(), getResponseTimeoutSeconds(), getWorkflowInstanceId(), getWorkflowType(), getTaskId(), getReasonForIncompletion(), getCallbackAfterSeconds(), getWorkerId(), getOutputData(), getWorkflowTask(), getDomain(), getInputMessage(), getOutputMessage(), getRateLimitPerFrequency(), getRateLimitFrequencyInSeconds(), getExternalInputPayloadStoragePath(), getExternalOutputPayloadStoragePath());
}
}
代码示例来源:origin: com.netflix.conductor/conductor-grpc
to.setExecuted( from.isExecuted() );
to.setCallbackFromWorker( from.isCallbackFromWorker() );
to.setResponseTimeoutSeconds( from.getResponseTimeoutSeconds() );
内容来源于网络,如有侵权,请联系作者删除!