本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.setSeq()
方法的一些代码示例,展示了Task.setSeq()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setSeq()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:setSeq
暂无
代码示例来源:origin: Netflix/conductor
task.setSeq(++count);
代码示例来源:origin: Netflix/conductor
@Test
public void testCreateTaskException2() {
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(1);
task.setTaskId(UUID.randomUUID().toString());
task.setTaskDefName("task1");
task.setWorkflowInstanceId(UUID.randomUUID().toString());
expectedException.expect(ApplicationException.class);
expectedException.expectMessage("Task reference name cannot be null");
getExecutionDAO().createTasks(Collections.singletonList(task));
}
代码示例来源:origin: Netflix/conductor
@Test
public void testCreateTaskException() {
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(1);
task.setTaskId(UUID.randomUUID().toString());
task.setTaskDefName("task1");
expectedException.expect(ApplicationException.class);
expectedException.expectMessage("Workflow instance id cannot be null");
getExecutionDAO().createTasks(Collections.singletonList(task));
task.setWorkflowInstanceId(UUID.randomUUID().toString());
expectedException.expect(ApplicationException.class);
expectedException.expectMessage("Task reference name cannot be null");
getExecutionDAO().createTasks(Collections.singletonList(task));
}
代码示例来源:origin: Netflix/conductor
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(i + 1);
task.setTaskId(workflowId + "_t" + i);
task.setReferenceTaskName("t" + i);
task.setSeq(1);
task.setTaskId(workflowId + "_t" + 2);
task.setReferenceTaskName("t" + 2);
task.setSeq(1);
task.setTaskId(workflowId + "_t" + 1);
task.setReferenceTaskName("t" + 1);
代码示例来源:origin: Netflix/conductor
task_1.setSeq(1);
task_1.setStatus(Status.FAILED);
task_1.setTaskDefName(workflowTask.getName());
task_2.setSeq(2);
task_2.setStatus(Status.FAILED);
task_2.setTaskDefName(workflowTask.getName());
代码示例来源:origin: Netflix/conductor
@Test
public void testGetTaskByRef() {
Workflow workflow = new Workflow();
Task t1 = new Task();
t1.setReferenceTaskName("ref");
t1.setSeq(0);
t1.setStatus(Status.TIMED_OUT);
Task t2 = new Task();
t2.setReferenceTaskName("ref");
t2.setSeq(1);
t2.setStatus(Status.FAILED);
Task t3 = new Task();
t3.setReferenceTaskName("ref");
t3.setSeq(2);
t3.setStatus(Status.COMPLETED);
workflow.getTasks().add(t1);
workflow.getTasks().add(t2);
workflow.getTasks().add(t3);
Task task = workflow.getTaskByRefName("ref");
assertNotNull(task);
assertEquals(Status.COMPLETED, task.getStatus());
assertEquals(t3.getSeq(), task.getSeq());
}
代码示例来源:origin: Netflix/conductor
task_1_1.setSeq(1);
task_1_1.setStatus(Status.FAILED);
task_1_1.setTaskDefName("task_1_def");
task_1_2.setSeq(10);
task_1_2.setStatus(Status.FAILED);
task_1_2.setTaskDefName("task_1_def");
task_1_3_1.setSeq(100);
task_1_3_1.setStatus(Status.FAILED);
task_1_3_1.setTaskDefName("task_1_def");
task_1_3_2.setSeq(101);
task_1_3_2.setStatus(Status.FAILED);
task_1_3_2.setTaskDefName("task_1_def");
task_2_1.setSeq(2);
task_2_1.setStatus(Status.COMPLETED);
task_2_1.setTaskDefName("task_2_def");
task_2_2.setSeq(20);
task_2_2.setStatus(Status.FAILED);
task_2_2.setTaskDefName("task_2_def");
task_3_1.setSeq(20);
task_3_1.setStatus(Status.TIMED_OUT);
task_3_1.setTaskDefName("task_3_def");
代码示例来源:origin: Netflix/conductor
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(1);
task.setTaskId(workflowId + "_t" + i);
task.setReferenceTaskName("testTaskOps" + i);
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(1);
task.setTaskId("x" + workflowId + "_t" + i);
task.setReferenceTaskName("testTaskOps" + i);
代码示例来源:origin: Netflix/conductor
task_1_1.setSeq(20);
task_1_1.setRetryCount(0);
task_1_1.setTaskType(TaskType.SIMPLE.toString());
task_1_2.setSeq(21);
task_1_2.setRetryCount(1);
task_1_2.setTaskType(TaskType.SIMPLE.toString());
task_2_1.setSeq(22);
task_2_1.setRetryCount(0);
task_2_1.setStatus(Status.FAILED);
task_3_1.setSeq(23);
task_3_1.setRetryCount(0);
task_3_1.setStatus(Status.CANCELED);
task_4_1.setSeq(122);
task_4_1.setRetryCount(0);
task_4_1.setStatus(Status.FAILED);
代码示例来源:origin: Netflix/conductor
task.setSeq(1);
task.setTaskId(UUID.randomUUID().toString());
task.setReferenceTaskName("t1");
task2.setSeq(2);
task2.setTaskId(UUID.randomUUID().toString());
task2.setReferenceTaskName("t2");
task3.setSeq(3);
task3.setTaskId(UUID.randomUUID().toString());
task3.setReferenceTaskName("t3");
代码示例来源:origin: Netflix/conductor
task1.setTaskType("junit_task_l1");
task1.setReferenceTaskName("s1");
task1.setSeq(1);
task1.setRetried(false);
task1.setExecuted(false);
task2.setTaskType("junit_task_l2");
task2.setReferenceTaskName("s2");
task2.setSeq(2);
task2.setRetried(false);
task2.setExecuted(false);
代码示例来源:origin: Netflix/conductor
to.setReferenceTaskName( from.getReferenceTaskName() );
to.setRetryCount( from.getRetryCount() );
to.setSeq( from.getSeq() );
to.setCorrelationId( from.getCorrelationId() );
to.setPollCount( from.getPollCount() );
代码示例来源:origin: Netflix/conductor
@Test
public void testTaskExceedsLimit() {
TaskDef taskDefinition = new TaskDef();
taskDefinition.setName("task1");
taskDefinition.setConcurrentExecLimit(1);
WorkflowTask workflowTask = new WorkflowTask();
workflowTask.setName("task1");
workflowTask.setTaskDefinition(taskDefinition);
workflowTask.setTaskDefinition(taskDefinition);
List<Task> tasks = new LinkedList<>();
for (int i = 0; i < 15; i++) {
Task task = new Task();
task.setScheduledTime(1L);
task.setSeq(i + 1);
task.setTaskId("t_" + i);
task.setWorkflowInstanceId("workflow_" + i);
task.setReferenceTaskName("task1");
task.setTaskDefName("task1");
tasks.add(task);
task.setStatus(Task.Status.SCHEDULED);
task.setWorkflowTask(workflowTask);
}
getExecutionDAO().createTasks(tasks);
assertFalse(getExecutionDAO().exceedsInProgressLimit(tasks.get(0)));
tasks.get(0).setStatus(Task.Status.IN_PROGRESS);
getExecutionDAO().updateTask(tasks.get(0));
for (Task task : tasks) {
assertTrue(getExecutionDAO().exceedsInProgressLimit(task));
}
}
代码示例来源: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: com.netflix.conductor/conductor-core
task.setSeq(++count);
代码示例来源:origin: com.netflix.conductor/conductor-grpc
to.setReferenceTaskName( from.getReferenceTaskName() );
to.setRetryCount( from.getRetryCount() );
to.setSeq( from.getSeq() );
to.setCorrelationId( from.getCorrelationId() );
to.setPollCount( from.getPollCount() );
内容来源于网络,如有侵权,请联系作者删除!