Skip to content

Commit

Permalink
fix(log): correct the log routing path #2148
Browse files Browse the repository at this point in the history
  • Loading branch information
guowl3 authored Apr 2, 2024
1 parent 158dae7 commit a331f7e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ protected AlterScheduleResult start(Long taskId, TaskService taskService, Delega
taskService.fail(taskId, 0, taskResult);
log.warn("Alter schedule failed,error={}", e.getMessage());
return taskResult;
} finally {
AlterScheduleTraceContextHolder.clear();
}

}

@Override
Expand All @@ -134,19 +131,22 @@ protected boolean isFailure() {
protected void onFailure(Long taskId, TaskService taskService) {
log.warn("Alter schedule failed, taskId={}", taskId);
super.callback(getFlowInstanceId(), getTargetTaskInstanceId(), FlowNodeStatus.FAILED, null);
AlterScheduleTraceContextHolder.clear();
}

@Override
protected void onSuccessful(Long taskId, TaskService taskService) {
log.info("Alter schedule succeed, taskId={}", taskId);
super.callback(getFlowInstanceId(), getTargetTaskInstanceId(), FlowNodeStatus.COMPLETED, null);
updateFlowInstanceStatus(FlowStatus.EXECUTION_SUCCEEDED);
AlterScheduleTraceContextHolder.clear();
}

@Override
protected void onTimeout(Long taskId, TaskService taskService) {
log.warn("Alter schedule timeout, taskId={}", taskId);
super.callback(getFlowInstanceId(), getTargetTaskInstanceId(), FlowNodeStatus.EXPIRED, null);
AlterScheduleTraceContextHolder.clear();
}

@Override
Expand All @@ -157,6 +157,7 @@ protected void onProgressUpdate(Long taskId, TaskService taskService) {
@Override
protected boolean cancel(boolean mayInterruptIfRunning, Long taskId, TaskService taskService) {
taskService.cancel(taskId);
AlterScheduleTraceContextHolder.clear();
return true;
}

Expand Down

0 comments on commit a331f7e

Please sign in to comment.