|
@@ -69,21 +69,10 @@ public class AdminBizImpl implements AdminBiz {
|
69
|
69
|
for (int i = 0; i < childJobKeys.length; i++) {
|
70
|
70
|
String[] jobKeyArr = childJobKeys[i].split("_");
|
71
|
71
|
if (jobKeyArr!=null && jobKeyArr.length==2) {
|
72
|
|
- XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.valueOf(jobKeyArr[1]));
|
73
|
|
- if (childJobInfo!=null) {
|
74
|
|
- try {
|
75
|
|
- boolean ret = XxlJobDynamicScheduler.triggerJob(String.valueOf(childJobInfo.getId()), String.valueOf(childJobInfo.getJobGroup()));
|
76
|
|
-
|
77
|
|
- // add msg
|
78
|
|
- childTriggerMsg += MessageFormat.format("<br> {0}/{1} 触发子任务成功, 子任务Key: {2}, status: {3}, 子任务描述: {4}",
|
79
|
|
- (i+1), childJobKeys.length, childJobKeys[i], ret, childJobInfo.getJobDesc());
|
80
|
|
- } catch (SchedulerException e) {
|
81
|
|
- logger.error(e.getMessage(), e);
|
82
|
|
- }
|
83
|
|
- } else {
|
84
|
|
- childTriggerMsg += MessageFormat.format("<br> {0}/{1} 触发子任务失败, 子任务xxlJobInfo不存在, 子任务Key: {2}",
|
85
|
|
- (i+1), childJobKeys.length, childJobKeys[i]);
|
86
|
|
- }
|
|
72
|
+ ReturnT<String> triggerChildResult = xxlJobService.triggerJob(Integer.valueOf(jobKeyArr[1]));
|
|
73
|
+ // add msg
|
|
74
|
+ childTriggerMsg += MessageFormat.format("<br> {0}/{1} 触发子任务{2}, 子任务Key: {3}, 子任务触发备注: {4}",
|
|
75
|
+ (i+1), childJobKeys.length, (triggerChildResult.getCode()==ReturnT.SUCCESS_CODE?"成功":"失败"), childJobKeys[i], triggerChildResult.getMsg());
|
87
|
76
|
} else {
|
88
|
77
|
childTriggerMsg += MessageFormat.format("<br> {0}/{1} 触发子任务失败, 子任务Key格式错误, 子任务Key: {2}",
|
89
|
78
|
(i+1), childJobKeys.length, childJobKeys[i]);
|