Skip to content

Commit

Permalink
fix null point exception becase of miss retry context in notifyInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu10 committed Nov 22, 2024
1 parent e22df46 commit 0a8f815
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,16 @@ private ExecutionResult dispatchTask(String executionId, TaskInfo taskInfo, Map<
output = buildOutput(dispatchRetJson);
log.info("dispatchTask success, executionId:{}, taskName:{}, output:{}",
executionId, taskInfo.getName(), output);

TaskStatus taskStatus = buildTaskStatus(output, taskInfo, taskInvokeMsg);
Retry retry = ((FunctionTask) taskInfo.getTask()).getRetry();
RetryContext retryContext = RetryContext.builder().retryConfig(retry).taskStatus(taskStatus).taskInfo(taskInfo).build();
NotifyInfo notifyInfo = NotifyInfo.builder()
.taskInfoName(taskInfo.getName())
.taskStatus(buildTaskStatus(output, taskInfo, taskInvokeMsg))
.taskStatus(taskStatus)
.retryContext(retryContext)
.taskInvokeMsg(taskInvokeMsg)
.build();

Retry retry = ((FunctionTask) taskInfo.getTask()).getRetry();
RetryContext retryContext = RetryContext.builder().retryConfig(retry).taskStatus(notifyInfo.getTaskStatus()).taskInfo(taskInfo).build();
if (retryPolicy.needRetry(retryContext, output)) {
return handleRetryCallback(executionId, taskInfo, notifyInfo);
}
Expand Down

0 comments on commit 0a8f815

Please sign in to comment.