com.netflix.conductor.common.metadata.tasks.Task.getReasonForIncompletion()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.getReasonForIncompletion()方法的一些代码示例,展示了Task.getReasonForIncompletion()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getReasonForIncompletion()方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:getReasonForIncompletion

Task.getReasonForIncompletion介绍

暂无

代码示例

代码示例来源:origin: Netflix/conductor

this.endTime = sdf.format(new Date(task.getEndTime()));
this.status = task.getStatus();
this.reasonForIncompletion = task.getReasonForIncompletion();
this.queueWaitTime = task.getQueueWaitTime();
if (task.getInputData() != null) {

代码示例来源:origin: Netflix/conductor

hasFailures = !taskStatus.isSuccessful();
if(hasFailures){
  failureReason.append(forkedTask.getReasonForIncompletion()).append(" ");

代码示例来源:origin: Netflix/conductor

taskParams.put("workflowInstanceId", task.getWorkflowInstanceId());
taskParams.put("taskId", task.getTaskId());
taskParams.put("reasonForIncompletion", task.getReasonForIncompletion());
taskParams.put("callbackAfterSeconds", task.getCallbackAfterSeconds());
taskParams.put("workerId", task.getWorkerId());

代码示例来源:origin: Netflix/conductor

public TaskResult(Task task) {
  this.workflowInstanceId = task.getWorkflowInstanceId();
  this.taskId = task.getTaskId();
  this.reasonForIncompletion = task.getReasonForIncompletion();
  this.callbackAfterSeconds = task.getCallbackAfterSeconds();
  this.status = Status.valueOf(task.getStatus().name());
  this.workerId = task.getWorkerId();
  this.outputData = task.getOutputData();
  this.externalOutputPayloadStoragePath = task.getExternalOutputPayloadStoragePath();
}

代码示例来源:origin: Netflix/conductor

@Test
public void testPost() {
  Task task = new Task();
  Input input = new Input();
  input.setUri("http://localhost:7009/post");
  Map<String, Object> body = new HashMap<>();
  body.put("input_key1", "value1");
  body.put("input_key2", 45.3d);
  input.setBody(body);
  input.setMethod("POST");
  task.getInputData().put(HttpTask.REQUEST_PARAMETER_NAME, input);
  httpTask.start(workflow, task, workflowExecutor);
  assertEquals(task.getReasonForIncompletion(), Task.Status.COMPLETED, task.getStatus());
  Map<String, Object> hr = (Map<String, Object>) task.getOutputData().get("response");
  Object response = hr.get("body");
  assertEquals(Task.Status.COMPLETED, task.getStatus());
  assertTrue("response is: " + response, response instanceof Map);
  Map<String, Object> map = (Map<String, Object>) response;
  Set<String> inputKeys = body.keySet();
  Set<String> responseKeys = map.keySet();
  inputKeys.containsAll(responseKeys);
  responseKeys.containsAll(inputKeys);
}

代码示例来源:origin: Netflix/conductor

Objects.equals(getWorkflowType(), task.getWorkflowType()) &&
Objects.equals(getTaskId(), task.getTaskId()) &&
Objects.equals(getReasonForIncompletion(), task.getReasonForIncompletion()) &&
Objects.equals(getWorkerId(), task.getWorkerId()) &&
Objects.equals(getOutputData(), task.getOutputData()) &&

代码示例来源:origin: Netflix/conductor

@Test
public void testPostNoContent() {
  Task task = new Task();
  Input input = new Input();
  input.setUri("http://localhost:7009/post2");
  Map<String, Object> body = new HashMap<>();
  body.put("input_key1", "value1");
  body.put("input_key2", 45.3d);
  input.setBody(body);
  input.setMethod("POST");
  task.getInputData().put(HttpTask.REQUEST_PARAMETER_NAME, input);
  httpTask.start(workflow, task, workflowExecutor);
  assertEquals(task.getReasonForIncompletion(), Task.Status.COMPLETED, task.getStatus());
  Map<String, Object> hr = (Map<String, Object>) task.getOutputData().get("response");
  Object response = hr.get("body");
  assertEquals(Task.Status.COMPLETED, task.getStatus());
  assertNull("response is: " + response, response);
}

代码示例来源:origin: Netflix/conductor

@Test
public void testFailure() {
  Task task = new Task();
  Input input = new Input();
  input.setUri("http://localhost:7009/failure");
  input.setMethod("GET");
  task.getInputData().put(HttpTask.REQUEST_PARAMETER_NAME, input);
  httpTask.start(workflow, task, workflowExecutor);
  assertEquals("Task output: " + task.getOutputData(), Task.Status.FAILED, task.getStatus());
  assertEquals(ERROR_RESPONSE, task.getReasonForIncompletion());
  task.setStatus(Status.SCHEDULED);
  task.getInputData().remove(HttpTask.REQUEST_PARAMETER_NAME);
  httpTask.start(workflow, task, workflowExecutor);
  assertEquals(Task.Status.FAILED, task.getStatus());
  assertEquals(HttpTask.MISSING_REQUEST, task.getReasonForIncompletion());
}

代码示例来源:origin: Netflix/conductor

assertEquals(ERROR_RESPONSE, task.getReasonForIncompletion());
assertTrue(!task.getStatus().isSuccessful());
httpTask.start(workflow, task, workflowExecutor);
assertEquals(Task.Status.FAILED, task.getStatus());
assertEquals(HttpTask.MISSING_REQUEST, task.getReasonForIncompletion());
assertTrue(!task.getStatus().isSuccessful());

代码示例来源: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

WorkflowStatus status = task.getStatus().equals(TIMED_OUT) ? WorkflowStatus.TIMED_OUT : WorkflowStatus.FAILED;
updateWorkflowOutput(workflow, task);
throw new TerminateWorkflowException(task.getReasonForIncompletion(), status, task);

代码示例来源:origin: Netflix/conductor

assertNotNull(task.getReasonForIncompletion(), queue);
assertEquals("queue_name", queue.getName());
assertEquals("sqs", queue.getType());

代码示例来源:origin: Netflix/conductor

assertEquals("not in progress: " + task.getReasonForIncompletion(), Task.Status.IN_PROGRESS, task.getStatus());
assertNotNull(queue);
assertEquals("testWorkflow:task0", queue.getName());
assertEquals("not in progress: " + task.getReasonForIncompletion(), Task.Status.IN_PROGRESS, task.getStatus());
assertNotNull(queue);
assertEquals("my_sqs_queue_name", queue.getName());

代码示例来源:origin: Netflix/conductor

to.setTaskId( from.getTaskId() );
if (from.getReasonForIncompletion() != null) {
  to.setReasonForIncompletion( from.getReasonForIncompletion() );

代码示例来源:origin: com.netflix.conductor/conductor-core

hasFailures = !taskStatus.isSuccessful();
if(hasFailures){
  failureReason.append(forkedTask.getReasonForIncompletion()).append(" ");

代码示例来源:origin: com.netflix.conductor/conductor-common

this.endTime = sdf.format(new Date(task.getEndTime()));
this.status = task.getStatus();
this.reasonForIncompletion = task.getReasonForIncompletion();
this.queueWaitTime = task.getQueueWaitTime();
if (task.getInputData() != null) {

代码示例来源:origin: com.netflix.conductor/conductor-common

public TaskResult(Task task) {
  this.workflowInstanceId = task.getWorkflowInstanceId();
  this.taskId = task.getTaskId();
  this.reasonForIncompletion = task.getReasonForIncompletion();
  this.callbackAfterSeconds = task.getCallbackAfterSeconds();
  this.status = Status.valueOf(task.getStatus().name());
  this.workerId = task.getWorkerId();
  this.outputData = task.getOutputData();
  this.externalOutputPayloadStoragePath = task.getExternalOutputPayloadStoragePath();
}

代码示例来源:origin: com.netflix.conductor/conductor-common

Objects.equals(getWorkflowType(), task.getWorkflowType()) &&
Objects.equals(getTaskId(), task.getTaskId()) &&
Objects.equals(getReasonForIncompletion(), task.getReasonForIncompletion()) &&
Objects.equals(getWorkerId(), task.getWorkerId()) &&
Objects.equals(getOutputData(), task.getOutputData()) &&

代码示例来源:origin: com.netflix.conductor/conductor-core

WorkflowStatus status = task.getStatus().equals(TIMED_OUT) ? WorkflowStatus.TIMED_OUT : WorkflowStatus.FAILED;
updateWorkflowOutput(workflow, task);
throw new TerminateWorkflowException(task.getReasonForIncompletion(), status, task);

代码示例来源: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());
  }
}

相关文章

Task类方法