mgsky1 commented on a change in pull request #6272:
URL: https://github.com/apache/dolphinscheduler/pull/6272#discussion_r802527928
##########
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:
When detecting process block flag becomes true, I think it can send two
events, one for task status change(blocking task runs complete), another for
blocking the process. What do you think about this?
--
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]