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
88dc1068
authored
Jul 24, 2016
by
xueli.xue
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
coding
parent
8048b0c7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
README.md
xxl-job-admin/src/main/java/com/xxl/job/admin/core/callback/XxlJobLogCallbackServerHandler.java
README.md
View file @
88dc1068
This diff is collapsed.
Click to expand it.
xxl-job-admin/src/main/java/com/xxl/job/admin/core/callback/XxlJobLogCallbackServerHandler.java
View file @
88dc1068
...
...
@@ -43,6 +43,7 @@ public class XxlJobLogCallbackServerHandler extends AbstractHandler {
if
(
log
!=
null
)
{
// trigger success, to trigger child job, and avoid repeat trigger child job
String
childTriggerMsg
=
null
;
if
(!
ResponseModel
.
SUCCESS
.
equals
(
log
.
getHandleStatus
()))
{
XxlJobInfo
xxlJobInfo
=
DynamicSchedulerUtil
.
xxlJobInfoDao
.
load
(
log
.
getJobGroup
(),
log
.
getJobName
());
if
(
xxlJobInfo
!=
null
&&
StringUtils
.
isNotBlank
(
xxlJobInfo
.
getChildJobKey
()))
{
...
...
@@ -54,13 +55,15 @@ public class XxlJobLogCallbackServerHandler extends AbstractHandler {
boolean
ret
=
DynamicSchedulerUtil
.
triggerJob
(
childJobInfo
.
getJobName
(),
childJobInfo
.
getJobGroup
());
// add msg
String
msg
=
requestModel
.
getMsg
();
msg
+=
MessageFormat
.
format
(
"<br> 触发子任务执行, jobKey:{0}, status:{1}, 描述:{2}"
,
xxlJobInfo
.
getChildJobKey
(),
ret
,
childJobInfo
.
getJobDesc
());
requestModel
.
setMsg
(
msg
);
childTriggerMsg
+=
MessageFormat
.
format
(
"<br> 触发子任务成功, 子任务Key: {0}, status: {1}, 子任务描述: {2}"
,
xxlJobInfo
.
getChildJobKey
(),
ret
,
childJobInfo
.
getJobDesc
());
}
catch
(
SchedulerException
e
)
{
logger
.
error
(
""
,
e
);
}
}
else
{
childTriggerMsg
=
"<br> 触发子任务失败, 子任务xxlJobInfo不存在, 子任务Key:"
+
xxlJobInfo
.
getChildJobKey
();
}
}
else
{
childTriggerMsg
=
"<br> 触发子任务失败, 子任务Key格式错误, 子任务Key:"
+
xxlJobInfo
.
getChildJobKey
();
}
}
}
...
...
@@ -68,7 +71,7 @@ public class XxlJobLogCallbackServerHandler extends AbstractHandler {
// save log
log
.
setHandleTime
(
new
Date
());
log
.
setHandleStatus
(
requestModel
.
getStatus
());
log
.
setHandleMsg
(
requestModel
.
getMsg
());
log
.
setHandleMsg
(
requestModel
.
getMsg
()
+
childTriggerMsg
);
DynamicSchedulerUtil
.
xxlJobLogDao
.
updateHandleInfo
(
log
);
responseModel
=
new
ResponseModel
(
ResponseModel
.
SUCCESS
,
null
);
}
else
{
...
...
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