ruanwenjun commented on code in PR #11774:
URL: https://github.com/apache/dolphinscheduler/pull/11774#discussion_r971998819


##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java:
##########
@@ -81,9 +89,16 @@ public class AlertDao {
      * @return add alert result
      */
     public int addAlert(Alert alert) {
+        if (null == alert.getAlertGroupId() || 
NumberUtils.INTEGER_ZERO.equals(alert.getAlertGroupId())) {

Review Comment:
   Why use `NumberUtils.INTEGER_ZERO` rather than `0 ==alert.getAlertGroupId()` 
here?



##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/alert/ProcessAlertManager.java:
##########
@@ -217,13 +216,7 @@ public void sendAlertWorkerToleranceFault(ProcessInstance 
processInstance, List<
     public void sendAlertProcessInstance(ProcessInstance processInstance,
                                          List<TaskInstance> taskInstances,
                                          ProjectUser projectUser) {
-
-        if (!isNeedToSendWarning(processInstance)) {

Review Comment:
   It's better don't remove this, since this method mighe be execute by another 
where, you can remove this check in `WorkflowExecuteRunnable`



-- 
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