Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
404500e9
authored
Oct 25, 2019
by
许雪里
Committed by
GitHub
Oct 25, 2019
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #1196 from Z-Beatles/hotfix-1022
Remove duplicate childJobId splices
parents
08f6177d
34ff10b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
21 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
View file @
404500e9
...
@@ -91,11 +91,12 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -91,11 +91,12 @@ public class XxlJobServiceImpl implements XxlJobService {
}
}
// ChildJobId valid
// ChildJobId valid
if
(
jobInfo
.
getChildJobId
()!=
null
&&
jobInfo
.
getChildJobId
().
trim
().
length
()>
0
)
{
String
childJobId
=
jobInfo
.
getChildJobId
();
String
[]
childJobIds
=
jobInfo
.
getChildJobId
().
split
(
","
);
if
(
childJobId
!=
null
&&
childJobId
.
trim
().
length
()>
0
)
{
String
[]
childJobIds
=
childJobId
.
split
(
","
);
for
(
String
childJobIdItem:
childJobIds
)
{
for
(
String
childJobIdItem:
childJobIds
)
{
if
(
childJobIdItem
!=
null
&&
childJobIdItem
.
trim
().
length
()>
0
&&
isNumeric
(
childJobIdItem
))
{
if
(
childJobIdItem
!=
null
&&
childJobIdItem
.
trim
().
length
()>
0
&&
isNumeric
(
childJobIdItem
))
{
XxlJobInfo
childJobInfo
=
xxlJobInfoDao
.
loadById
(
Integer
.
valueOf
(
childJobIdItem
));
XxlJobInfo
childJobInfo
=
xxlJobInfoDao
.
loadById
(
Integer
.
parseInt
(
childJobIdItem
));
if
(
childJobInfo
==
null
)
{
if
(
childJobInfo
==
null
)
{
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
MessageFormat
.
format
((
I18nUtil
.
getString
(
"jobinfo_field_childJobId"
)+
"({0})"
+
I18nUtil
.
getString
(
"system_not_found"
)),
childJobIdItem
));
MessageFormat
.
format
((
I18nUtil
.
getString
(
"jobinfo_field_childJobId"
)+
"({0})"
+
I18nUtil
.
getString
(
"system_not_found"
)),
childJobIdItem
));
...
@@ -106,13 +107,7 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -106,13 +107,7 @@ public class XxlJobServiceImpl implements XxlJobService {
}
}
}
}
String
temp
=
""
;
// join ,
jobInfo
.
setChildJobId
(
childJobId
);
for
(
String
item:
childJobIds
)
{
temp
+=
item
+
","
;
}
temp
=
temp
.
substring
(
0
,
temp
.
length
()-
1
);
jobInfo
.
setChildJobId
(
temp
);
}
}
// add in db
// add in db
...
@@ -154,11 +149,12 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -154,11 +149,12 @@ public class XxlJobServiceImpl implements XxlJobService {
}
}
// ChildJobId valid
// ChildJobId valid
if
(
jobInfo
.
getChildJobId
()!=
null
&&
jobInfo
.
getChildJobId
().
trim
().
length
()>
0
)
{
String
childJobId
=
jobInfo
.
getChildJobId
();
String
[]
childJobIds
=
jobInfo
.
getChildJobId
().
split
(
","
);
if
(
childJobId
!=
null
&&
childJobId
.
trim
().
length
()>
0
)
{
String
[]
childJobIds
=
childJobId
.
split
(
","
);
for
(
String
childJobIdItem:
childJobIds
)
{
for
(
String
childJobIdItem:
childJobIds
)
{
if
(
childJobIdItem
!=
null
&&
childJobIdItem
.
trim
().
length
()>
0
&&
isNumeric
(
childJobIdItem
))
{
if
(
childJobIdItem
!=
null
&&
childJobIdItem
.
trim
().
length
()>
0
&&
isNumeric
(
childJobIdItem
))
{
XxlJobInfo
childJobInfo
=
xxlJobInfoDao
.
loadById
(
Integer
.
valueOf
(
childJobIdItem
));
XxlJobInfo
childJobInfo
=
xxlJobInfoDao
.
loadById
(
Integer
.
parseInt
(
childJobIdItem
));
if
(
childJobInfo
==
null
)
{
if
(
childJobInfo
==
null
)
{
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
MessageFormat
.
format
((
I18nUtil
.
getString
(
"jobinfo_field_childJobId"
)+
"({0})"
+
I18nUtil
.
getString
(
"system_not_found"
)),
childJobIdItem
));
MessageFormat
.
format
((
I18nUtil
.
getString
(
"jobinfo_field_childJobId"
)+
"({0})"
+
I18nUtil
.
getString
(
"system_not_found"
)),
childJobIdItem
));
...
@@ -169,13 +165,7 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -169,13 +165,7 @@ public class XxlJobServiceImpl implements XxlJobService {
}
}
}
}
String
temp
=
""
;
// join ,
jobInfo
.
setChildJobId
(
childJobId
);
for
(
String
item:
childJobIds
)
{
temp
+=
item
+
","
;
}
temp
=
temp
.
substring
(
0
,
temp
.
length
()-
1
);
jobInfo
.
setChildJobId
(
temp
);
}
}
// group valid
// group valid
...
@@ -216,7 +206,7 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -216,7 +206,7 @@ public class XxlJobServiceImpl implements XxlJobService {
exists_jobInfo
.
setExecutorBlockStrategy
(
jobInfo
.
getExecutorBlockStrategy
());
exists_jobInfo
.
setExecutorBlockStrategy
(
jobInfo
.
getExecutorBlockStrategy
());
exists_jobInfo
.
setExecutorTimeout
(
jobInfo
.
getExecutorTimeout
());
exists_jobInfo
.
setExecutorTimeout
(
jobInfo
.
getExecutorTimeout
());
exists_jobInfo
.
setExecutorFailRetryCount
(
jobInfo
.
getExecutorFailRetryCount
());
exists_jobInfo
.
setExecutorFailRetryCount
(
jobInfo
.
getExecutorFailRetryCount
());
exists_jobInfo
.
setChildJobId
(
jobInfo
.
getChildJobId
()
);
exists_jobInfo
.
setChildJobId
(
childJobId
);
exists_jobInfo
.
setTriggerNextTime
(
nextTriggerTime
);
exists_jobInfo
.
setTriggerNextTime
(
nextTriggerTime
);
xxlJobInfoDao
.
update
(
exists_jobInfo
);
xxlJobInfoDao
.
update
(
exists_jobInfo
);
...
...
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