Commit 44bf9310 by huangfusuper

错误日志上传

parent 5feb60ca
...@@ -59,10 +59,11 @@ public class ClientRpcUtil { ...@@ -59,10 +59,11 @@ public class ClientRpcUtil {
//当前重试次数 小于等于总共的重试次数时 //当前重试次数 小于等于总共的重试次数时
if (thisRetryCount <= retryTotalCount) { if (thisRetryCount <= retryTotalCount) {
String format = String.format("%s,plugin-rpc通道建立时出现异常,异常信息为:%s,开始第%s次重试!", host, RPCLogUtil.getMessage(e), thisRetryCount); String format = String.format("%s,plugin-rpc通道建立时出现异常,异常信息为:%s,开始第%s次重试!", host, RPCLogUtil.getMessage(e), thisRetryCount);
String redisFormat = String.format("与执行服务器[%s]建立通道时出现异常,开始第%s次重试!", host, thisRetryCount);
log.error(format); log.error(format);
//redis模板 //redis模板
StringRedisTemplate stringRedisTemplate = RpcSpringUtil.getBean(StringRedisTemplate.class); StringRedisTemplate stringRedisTemplate = RpcSpringUtil.getBean(StringRedisTemplate.class);
RunLog runLog = RunLog.builder().runLog(format).isEnd(false).build(); RunLog runLog = RunLog.builder().runLog(redisFormat).isEnd(false).build();
stringRedisTemplate.opsForList().rightPush(runKey, JSON.toJSONString(runLog, WriteClassName)); stringRedisTemplate.opsForList().rightPush(runKey, JSON.toJSONString(runLog, WriteClassName));
Thread.sleep(1000 * thisRetryCount); Thread.sleep(1000 * thisRetryCount);
retryRpcHost(client, host,runKey, retryTotalCount, ++thisRetryCount); retryRpcHost(client, host,runKey, retryTotalCount, ++thisRetryCount);
......
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