Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
efeae947
Commit
efeae947
authored
Nov 05, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决报错信息重复打印BUG
parent
48f910e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
RequestUtil.java
...myth-rpc/src/main/java/com/byit/rpc/util/RequestUtil.java
+4
-1
ClientRpcUtil.java
...pc-client/src/main/java/com/byit/utils/ClientRpcUtil.java
+5
-0
No files found.
byit-myth-rpc/src/main/java/com/byit/rpc/util/RequestUtil.java
View file @
efeae947
...
@@ -78,13 +78,16 @@ public class RequestUtil {
...
@@ -78,13 +78,16 @@ public class RequestUtil {
retryRpcHost
(
client
,
host
,
runKey
,
retryTotalCount
,
++
thisRetryCount
);
retryRpcHost
(
client
,
host
,
runKey
,
retryTotalCount
,
++
thisRetryCount
);
}
}
if
(
thisRetryCount
==
1
)
{
String
format
=
String
.
format
(
"与主机【%s】建立通道,总共【%s】次,全部失败,开始挑选下一个负载均衡方案重试,请稍后"
,
host
,
retryTotalCount
);
String
format
=
String
.
format
(
"与主机【%s】建立通道,总共【%s】次,全部失败,开始挑选下一个负载均衡方案重试,请稍后"
,
host
,
retryTotalCount
);
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
(
format
).
isEnd
(
false
).
build
();
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
log
.
error
(
format
);
log
.
error
(
format
);
}
return
false
;
return
false
;
}
}
}
}
...
...
byit-plugin-core/myth-plugin-rpc-client/src/main/java/com/byit/utils/ClientRpcUtil.java
View file @
efeae947
...
@@ -69,12 +69,17 @@ public class ClientRpcUtil {
...
@@ -69,12 +69,17 @@ public class ClientRpcUtil {
Thread
.
sleep
(
1000
*
thisRetryCount
);
Thread
.
sleep
(
1000
*
thisRetryCount
);
retryRpcHost
(
client
,
host
,
runKey
,
retryTotalCount
,
++
thisRetryCount
);
retryRpcHost
(
client
,
host
,
runKey
,
retryTotalCount
,
++
thisRetryCount
);
}
}
if
(
thisRetryCount
==
1
){
String
format
=
String
.
format
(
"与主机【%s】建立通道,总共【%s】次,全部失败,开始挑选下一个负载均衡方案重试,请稍后"
,
host
,
retryTotalCount
);
String
format
=
String
.
format
(
"与主机【%s】建立通道,总共【%s】次,全部失败,开始挑选下一个负载均衡方案重试,请稍后"
,
host
,
retryTotalCount
);
//redis模板
//redis模板
StringRedisTemplate
stringRedisTemplate
=
SpringUtil
.
getBean
(
StringRedisTemplate
.
class
);
StringRedisTemplate
stringRedisTemplate
=
SpringUtil
.
getBean
(
StringRedisTemplate
.
class
);
RunLog
runLog
=
RunLog
.
builder
().
runLog
(
format
).
isEnd
(
false
).
build
();
RunLog
runLog
=
RunLog
.
builder
().
runLog
(
format
).
isEnd
(
false
).
build
();
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
log
.
error
(
format
);
log
.
error
(
format
);
}
return
false
;
return
false
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment