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


##########
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:
   hi @qingwli  when ```statusCode != HttpStatus.SC_OK``` && ```statusCode != 
AlertConstants.DEFAULT_VALUE```,do we need retry?



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