caishunfeng commented on a change in pull request #6272:
URL: https://github.com/apache/dolphinscheduler/pull/6272#discussion_r803258235



##########
File path: 
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
##########
@@ -652,6 +661,23 @@ private boolean processStateChangeHandler(StateEvent 
stateEvent) {
         return true;
     }
 
+    private boolean processBlockHandler(StateEvent stateEvent) {
+        try {
+            TaskInstance task = 
processService.findTaskInstanceById(stateEvent.getTaskInstanceId());
+            BlockingParameters parameters = (BlockingParameters) 
TaskParametersUtils.getParameters(TaskType.BLOCKING.getDesc(),
+                    task.getTaskParams());
+            if (parameters.isAlertWhenBlocking()) {
+                ProjectUser projectUser = 
processService.queryProjectWithUserByProcessInstanceId(processInstance.getId());
+                processAlertManager.sendProcessBlockingAlert(processInstance, 
projectUser);
+                logger.info("block alert send successful!");
+            }
+            taskStateChangeHandler(stateEvent);

Review comment:
       It's OK, how about adding a taskState event, but not call 
`taskStateChangeHandler` directly?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to