本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.setRetried()
方法的一些代码示例,展示了Task.setRetried()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setRetried()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:setRetried
暂无
代码示例来源:origin: Netflix/conductor
/**
* Reschedule a task
*
* @param task failed or cancelled task
* @return new instance of a task with "SCHEDULED" status
*/
private Task taskToBeRescheduled(Task task) {
Task taskToBeRetried = task.copy();
taskToBeRetried.setTaskId(IDGenerator.generate());
taskToBeRetried.setRetriedTaskId(task.getTaskId());
taskToBeRetried.setStatus(SCHEDULED);
taskToBeRetried.setRetryCount(task.getRetryCount() + 1);
taskToBeRetried.setRetried(false);
taskToBeRetried.setPollCount(0);
taskToBeRetried.setCallbackAfterSeconds(0);
task.setRetried(true);
return taskToBeRetried;
}
代码示例来源:origin: Netflix/conductor
.map(task -> {
task.setStatus(SCHEDULED);
task.setRetried(true);
task.setRetryCount(0);
return task;
代码示例来源:origin: Netflix/conductor
task.setRetried(true);
rescheduled.setCallbackAfterSeconds(startDelay);
rescheduled.setRetryCount(task.getRetryCount() + 1);
rescheduled.setRetried(false);
rescheduled.setTaskId(IDGenerator.generate());
rescheduled.setRetriedTaskId(task.getTaskId());
代码示例来源:origin: Netflix/conductor
task1.setReferenceTaskName("s1");
task1.setSeq(1);
task1.setRetried(false);
task1.setExecuted(false);
task1.setStatus(Status.COMPLETED);
task2.setReferenceTaskName("s2");
task2.setSeq(2);
task2.setRetried(false);
task2.setExecuted(false);
task2.setStatus(Status.COMPLETED);
代码示例来源:origin: Netflix/conductor
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
to.setRetriedTaskId( from.getRetriedTaskId() );
to.setRetried( from.getRetried() );
to.setExecuted( from.getExecuted() );
to.setCallbackFromWorker( from.getCallbackFromWorker() );
代码示例来源: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
/**
* Reschedule a task
*
* @param task failed or cancelled task
* @return new instance of a task with "SCHEDULED" status
*/
private Task taskToBeRescheduled(Task task) {
Task taskToBeRetried = task.copy();
taskToBeRetried.setTaskId(IDGenerator.generate());
taskToBeRetried.setRetriedTaskId(task.getTaskId());
taskToBeRetried.setStatus(SCHEDULED);
taskToBeRetried.setRetryCount(task.getRetryCount() + 1);
taskToBeRetried.setRetried(false);
taskToBeRetried.setPollCount(0);
taskToBeRetried.setCallbackAfterSeconds(0);
task.setRetried(true);
return taskToBeRetried;
}
代码示例来源:origin: com.netflix.conductor/conductor-core
.map(task -> {
task.setStatus(SCHEDULED);
task.setRetried(true);
task.setRetryCount(0);
return task;
代码示例来源:origin: com.netflix.conductor/conductor-core
task.setRetried(true);
rescheduled.setCallbackAfterSeconds(startDelay);
rescheduled.setRetryCount(task.getRetryCount() + 1);
rescheduled.setRetried(false);
rescheduled.setTaskId(IDGenerator.generate());
rescheduled.setRetriedTaskId(task.getTaskId());
代码示例来源:origin: com.netflix.conductor/conductor-grpc
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
to.setRetriedTaskId( from.getRetriedTaskId() );
to.setRetried( from.getRetried() );
to.setExecuted( from.getExecuted() );
to.setCallbackFromWorker( from.getCallbackFromWorker() );
内容来源于网络,如有侵权,请联系作者删除!