Bläddra i källkod

核心依赖Core内部国际化处理;

xuxueli 7 år sedan
förälder
incheckning
ff4378e1ce

+ 4 - 4
doc/XXL-JOB官方文档.md Visa fil

@@ -1234,6 +1234,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
1234 1234
 - 15、脚本任务Log文件流关闭优化;
1235 1235
 - 16、任务报表成功、失败和进行中统计问题修复;
1236 1236
 - 17、自研Log组件参数占位符改为"{}",并修复打印有参日志时参数不匹配导致报错的问题;
1237
+- 18、核心依赖Core内部国际化处理;
1237 1238
 
1238 1239
 
1239 1240
 ### TODO LIST
@@ -1255,10 +1256,9 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
1255 1256
 - 16、新增任务默认运行状态,任务更新时运行状态保持不变;
1256 1257
 - 17、提供多版本执行器:不依赖容器版本、不内嵌Jetty版本(通过配置executoraddress替换jetty通讯)等;
1257 1258
 - 18、注册中心支持扩展,除默认基于DB之外,支持扩展接入第三方注册中心如zk、eureka等;
1258
-- 19、依赖Core内部国际化处理;
1259
-- 20、流程任务,支持参数传递;
1260
-- 21、SimpleTrigger 支持;
1261
-- 22、支持通过API服务操作任务信息;
1259
+- 19、流程任务,支持参数传递;
1260
+- 20、SimpleTrigger 支持;
1261
+- 21、支持通过API服务操作任务信息;
1262 1262
 
1263 1263
 
1264 1264
 ## 七、其他

+ 6 - 6
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java Visa fil

@@ -50,7 +50,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
50 50
         // kill handlerThread, and create new one
51 51
         JobThread jobThread = XxlJobExecutor.loadJobThread(jobId);
52 52
         if (jobThread != null) {
53
-            XxlJobExecutor.removeJobThread(jobId, "人工手动终止");
53
+            XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job.");
54 54
             return ReturnT.SUCCESS;
55 55
         }
56 56
 
@@ -83,7 +83,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
83 83
             // valid old jobThread
84 84
             if (jobThread!=null && jobHandler != newJobHandler) {
85 85
                 // change handler, need kill old thread
86
-                removeOldReason = "更换JobHandler或更换任务模式,终止旧任务线程";
86
+                removeOldReason = "change jobhandler or glue type, and terminate the old job thread.";
87 87
 
88 88
                 jobThread = null;
89 89
                 jobHandler = null;
@@ -104,7 +104,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
104 104
                     !(jobThread.getHandler() instanceof GlueJobHandler
105 105
                         && ((GlueJobHandler) jobThread.getHandler()).getGlueUpdatetime()==triggerParam.getGlueUpdatetime() )) {
106 106
                 // change handler or gluesource updated, need kill old thread
107
-                removeOldReason = "更新任务逻辑或更换任务模式,终止旧任务线程";
107
+                removeOldReason = "change job source or glue type, and terminate the old job thread.";
108 108
 
109 109
                 jobThread = null;
110 110
                 jobHandler = null;
@@ -127,7 +127,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
127 127
                     !(jobThread.getHandler() instanceof ScriptJobHandler
128 128
                             && ((ScriptJobHandler) jobThread.getHandler()).getGlueUpdatetime()==triggerParam.getGlueUpdatetime() )) {
129 129
                 // change script or gluesource updated, need kill old thread
130
-                removeOldReason = "更新任务逻辑或更换任务模式,终止旧任务线程";
130
+                removeOldReason = "change job source or glue type, and terminate the old job thread.";
131 131
 
132 132
                 jobThread = null;
133 133
                 jobHandler = null;
@@ -147,12 +147,12 @@ public class ExecutorBizImpl implements ExecutorBiz {
147 147
             if (ExecutorBlockStrategyEnum.DISCARD_LATER == blockStrategy) {
148 148
                 // discard when running
149 149
                 if (jobThread.isRunningOrHasQueue()) {
150
-                    return new ReturnT<String>(ReturnT.FAIL_CODE, "阻塞处理策略-生效:"+ExecutorBlockStrategyEnum.DISCARD_LATER.getTitle());
150
+                    return new ReturnT<String>(ReturnT.FAIL_CODE, "block strategy effect:"+ExecutorBlockStrategyEnum.DISCARD_LATER.getTitle());
151 151
                 }
152 152
             } else if (ExecutorBlockStrategyEnum.COVER_EARLY == blockStrategy) {
153 153
                 // kill running jobThread
154 154
                 if (jobThread.isRunningOrHasQueue()) {
155
-                    removeOldReason = "阻塞处理策略-生效:" + ExecutorBlockStrategyEnum.COVER_EARLY.getTitle();
155
+                    removeOldReason = "block strategy effect:" + ExecutorBlockStrategyEnum.COVER_EARLY.getTitle();
156 156
 
157 157
                     jobThread = null;
158 158
                 }

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java Visa fil

@@ -91,7 +91,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
91 91
         // destory JobThreadRepository
92 92
         if (JobThreadRepository.size() > 0) {
93 93
             for (Map.Entry<Integer, JobThread> item: JobThreadRepository.entrySet()) {
94
-                removeJobThread(item.getKey(), "Web容器销毁终止");
94
+                removeJobThread(item.getKey(), "web container destroy and kill the job.");
95 95
             }
96 96
             JobThreadRepository.clear();
97 97
         }

+ 2 - 2
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java Visa fil

@@ -181,7 +181,7 @@ public class JobThread extends Thread{
181 181
                         TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), executeResult));
182 182
                     } else {
183 183
                         // is killed
184
-                        ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [业务运行中,被强制终止]");
184
+                        ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [job running,killed]");
185 185
                         TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), stopResult));
186 186
                     }
187 187
                 }
@@ -193,7 +193,7 @@ public class JobThread extends Thread{
193 193
 			TriggerParam triggerParam = triggerQueue.poll();
194 194
 			if (triggerParam!=null) {
195 195
 				// is killed
196
-				ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [任务尚未执行,在调度队列中被终止]");
196
+				ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [job not executed, in the job queue, killed.]");
197 197
 				TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), stopResult));
198 198
 			}
199 199
 		}