Browse Source

工具类重试错误

dev_shibei_match
jianjun 4 years ago
parent
commit
6f2db79912
  1. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java

@ -41,7 +41,6 @@ public class SendMqMsgUtils {
}
log.info("sendMsg param:{}", JSON.toJSONString(msg));
try {
// TODO
ValidatorUtils.validateEntity(msg, DefaultGroup.class);
} catch (ValidateException e) {
return new Result<String>().error(e.getMsg());
@ -53,9 +52,8 @@ public class SendMqMsgUtils {
int retryTime = 0;
Result<String> result = null;
do {
retryTime++;
result = HttpClientManager.getInstance().sendPostByHttps(msg.getRequestUrl(), JSON.toJSONString(msg));
log.info("sendMsg retryTime:{},result:{}", retryTime, JSON.toJSONString(result));
log.info("sendMsg retryTime:{},result:{}", retryTime++, JSON.toJSONString(result));
} while ((!result.success()) && retryTime < 2);
if (result.success()) {

Loading…
Cancel
Save