瀏覽代碼

问题优化

xuxueli 6 年之前
父節點
當前提交
0af73afa8c

+ 2 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/trigger/XxlJobTrigger.java 查看文件

@@ -83,8 +83,8 @@ public class XxlJobTrigger {
83 83
                 triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regaddress")).append(":").append(group.getRegistryList());
84 84
                 triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorRouteStrategy")).append(":").append(executorRouteStrategyEnum.getTitle()).append("("+i+"/"+addressList.size()+")"); // update01
85 85
                 triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorBlockStrategy")).append(":").append(blockStrategy.getTitle());
86
-                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailRetryCount")).append(":").append(finalFailRetryCount);
87 86
                 triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_timeout")).append(":").append(jobInfo.getExecutorTimeout());
87
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailRetryCount")).append(":").append(finalFailRetryCount);
88 88
 
89 89
                 // 3、trigger-valid
90 90
                 if (triggerResult.getCode()==ReturnT.SUCCESS_CODE && CollectionUtils.isEmpty(addressList)) {
@@ -154,8 +154,8 @@ public class XxlJobTrigger {
154 154
             triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regaddress")).append(":").append(group.getRegistryList());
155 155
             triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorRouteStrategy")).append(":").append(executorRouteStrategyEnum.getTitle());
156 156
             triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorBlockStrategy")).append(":").append(blockStrategy.getTitle());
157
-            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailRetryCount")).append(":").append(finalFailRetryCount);
158 157
             triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_timeout")).append(":").append(jobInfo.getExecutorTimeout());
158
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailRetryCount")).append(":").append(finalFailRetryCount);
159 159
 
160 160
             // 3、trigger-valid
161 161
             if (triggerResult.getCode()==ReturnT.SUCCESS_CODE && CollectionUtils.isEmpty(addressList)) {

+ 2 - 7
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java 查看文件

@@ -93,17 +93,12 @@ public class AdminBizImpl implements AdminBiz {
93 93
 
94 94
             }
95 95
         } else {
96
-            XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
97
-            if (xxlJobInfo.getExecutorFailRetryCount() > 0) {
98
-                int nextFailRetryCount = xxlJobInfo.getExecutorFailRetryCount()-1;
96
+            if (log.getExecutorFailRetryCount() > 0) {
97
+                int nextFailRetryCount = log.getExecutorFailRetryCount()-1;
99 98
 
100 99
                 JobTriggerPoolHelper.trigger(log.getJobId(), nextFailRetryCount);
101
-                ReturnT<String> retryTriggerResult = ReturnT.SUCCESS;
102 100
 
103 101
                 callbackMsg = "<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_fail_handle_retry") +"<<<<<<<<<<< </span><br>";
104
-
105
-                callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_msg1"),
106
-                        (retryTriggerResult.getCode()==ReturnT.SUCCESS_CODE?I18nUtil.getString("system_success"):I18nUtil.getString("system_fail")), retryTriggerResult.getMsg());
107 102
             }
108 103
         }
109 104
 

+ 0 - 1
xxl-job-admin/src/main/resources/i18n/message.properties 查看文件

@@ -224,7 +224,6 @@ jobconf_trigger_run=触发调度
224 224
 jobconf_trigger_child_run=触发子任务
225 225
 jobconf_callback_child_msg1={0}/{1} [任务ID={2}], 触发{3}, 触发备注: {4} <br>
226 226
 jobconf_callback_child_msg2={0}/{1} [任务ID={2}], 触发失败, 触发备注: 任务ID格式错误 <br>
227
-jobconf_callback_msg1=触发{0}, 触发备注: {1} <br>
228 227
 
229 228
 ## help
230 229
 job_help=使用教程

+ 0 - 1
xxl-job-admin/src/main/resources/i18n/message_en.properties 查看文件

@@ -224,7 +224,6 @@ jobconf_trigger_run=Trigger Job
224 224
 jobconf_trigger_child_run=Trigger child job
225 225
 jobconf_callback_child_msg1={0}/{1} [Job ID={2}], Trigger {3}, Trigger msg: {4} <br>
226 226
 jobconf_callback_child_msg2={0}/{1} [Job ID={2}], Trigger Fail, Trigger msg: Job ID is illegal <br>
227
-jobconf_callback_msg1=Trigger {0}, Trigger msg: {1} <br>
228 227
 
229 228
 ## help
230 229
 job_help=Tutorial