Commit a8cdccb0 by huangfusuper

重试日志

parent bd28ee49
...@@ -24,9 +24,10 @@ public class RequestUtil { ...@@ -24,9 +24,10 @@ public class RequestUtil {
* @throws InterruptedException 睡眠异常 * @throws InterruptedException 睡眠异常
*/ */
public static void retryPost(String requestUrl,String body,int retryTotalCount, int thisRetryCount) throws InterruptedException { public static void retryPost(String requestUrl,String body,int retryTotalCount, int thisRetryCount) throws InterruptedException {
log.info("------当前的请求的地址为:{}-------",requestUrl);
try { try {
log.info("------当前的请求的地址为:{}-------",requestUrl);
HttpUtil.post(requestUrl, body, TIMEOUT_DEFAULT); HttpUtil.post(requestUrl, body, TIMEOUT_DEFAULT);
log.info("------{}请求成功,重试了{}次------",requestUrl,thisRetryCount);
}catch (Exception e) { }catch (Exception e) {
//当前重试次数 小于等于总共的重试次数时 //当前重试次数 小于等于总共的重试次数时
if(thisRetryCount <= retryTotalCount){ if(thisRetryCount <= retryTotalCount){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment