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
a8cdccb0
Commit
a8cdccb0
authored
Aug 03, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重试日志
parent
bd28ee49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
RequestUtil.java
...utor-server/src/main/java/com/byit/utils/RequestUtil.java
+2
-1
No files found.
byit-myth-executor/myth-executor-server/src/main/java/com/byit/utils/RequestUtil.java
View file @
a8cdccb0
...
@@ -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
){
...
...
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