APISonar


com.netflix.conductor.common.metadata.tasks.TaskResult.log

> com > netflix > conductor > common > metadata > tasks > TaskResult > log
com APIs netflix APIs conductor APIs common APIs metadata APIs tasks APIs TaskResult APIs log APIs

Example 1
private void handleException(Throwable t, TaskResult result, Worker worker, Task task) {
		logger.error(String.format("Error while executing task %s", task.toString()), t);
		WorkflowTaskMetrics.incrementTaskExecutionErrorCount(worker.getTaskDefName(), t);
		result.setStatus(TaskResult.Status.FAILED);
		result.setReasonForIncompletion("Error while executing the task: " + t);

		StringWriter stringWriter = new StringWriter();
		t.printStackTrace(new PrintWriter(stringWriter));
		result.log(stringWriter.toString());

		updateWithRetry(updateRetryCount, task, result, worker);
	}