qingwli commented on code in PR #14972:
URL: 
https://github.com/apache/dolphinscheduler/pull/14972#discussion_r1339422955


##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-pagerduty/src/main/java/org/apache/dolphinscheduler/plugin/alert/pagerduty/PagerDutySender.java:
##########
@@ -53,21 +54,28 @@ public AlertResult sendPagerDutyAlter(String title, String 
content) {
         alertResult.setStatus("false");
         alertResult.setMessage("send pager duty alert fail.");
 
-        try {
-            sendPagerDutyAlterV2(alertResult, title, content);
-        } catch (Exception e) {
-            log.info("send pager duty alert exception : {}", e.getMessage());
+        for (int i = 0; i < AlertConstants.RETRY_TIMES; i++) {
+            try {
+                int statusCode = sendPagerDutyAlterV2(alertResult, title, 
content);
+                if (statusCode != AlertConstants.DEFAULT_VALUE) {

Review Comment:
    No, if got statusCode not HttpStatus.SC_OK but actually got a code means 
the request is correct but got the wrong response, it's not network issue, it's 
config error



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