Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aboota
xxl-job
提交
ff4378e1
X
xxl-job
项目概览
aboota
/
xxl-job
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
xxl-job
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ff4378e1
编写于
7月 03, 2018
作者:
许雪里
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
核心依赖Core内部国际化处理;
上级
d9355f42
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
13 deletion
+13
-13
doc/XXL-JOB官方文档.md
doc/XXL-JOB官方文档.md
+4
-4
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
.../main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
+6
-6
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
...c/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+1
-1
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
...core/src/main/java/com/xxl/job/core/thread/JobThread.java
+2
-2
未找到文件。
doc/XXL-JOB官方文档.md
浏览文件 @
ff4378e1
...
...
@@ -1234,6 +1234,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
15、脚本任务Log文件流关闭优化;
-
16、任务报表成功、失败和进行中统计问题修复;
-
17、自研Log组件参数占位符改为"{}",并修复打印有参日志时参数不匹配导致报错的问题;
-
18、核心依赖Core内部国际化处理;
### TODO LIST
...
...
@@ -1255,10 +1256,9 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
16、新增任务默认运行状态,任务更新时运行状态保持不变;
-
17、提供多版本执行器:不依赖容器版本、不内嵌Jetty版本(通过配置executoraddress替换jetty通讯)等;
-
18、注册中心支持扩展,除默认基于DB之外,支持扩展接入第三方注册中心如zk、eureka等;
-
19、依赖Core内部国际化处理;
-
20、流程任务,支持参数传递;
-
21、SimpleTrigger 支持;
-
22、支持通过API服务操作任务信息;
-
19、流程任务,支持参数传递;
-
20、SimpleTrigger 支持;
-
21、支持通过API服务操作任务信息;
## 七、其他
...
...
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
浏览文件 @
ff4378e1
...
...
@@ -50,7 +50,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
// kill handlerThread, and create new one
JobThread
jobThread
=
XxlJobExecutor
.
loadJobThread
(
jobId
);
if
(
jobThread
!=
null
)
{
XxlJobExecutor
.
removeJobThread
(
jobId
,
"
人工手动终止
"
);
XxlJobExecutor
.
removeJobThread
(
jobId
,
"
scheduling center kill job.
"
);
return
ReturnT
.
SUCCESS
;
}
...
...
@@ -83,7 +83,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
// valid old jobThread
if
(
jobThread
!=
null
&&
jobHandler
!=
newJobHandler
)
{
// change handler, need kill old thread
removeOldReason
=
"
更换JobHandler或更换任务模式,终止旧任务线程
"
;
removeOldReason
=
"
change jobhandler or glue type, and terminate the old job thread.
"
;
jobThread
=
null
;
jobHandler
=
null
;
...
...
@@ -104,7 +104,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
!(
jobThread
.
getHandler
()
instanceof
GlueJobHandler
&&
((
GlueJobHandler
)
jobThread
.
getHandler
()).
getGlueUpdatetime
()==
triggerParam
.
getGlueUpdatetime
()
))
{
// change handler or gluesource updated, need kill old thread
removeOldReason
=
"
更新任务逻辑或更换任务模式,终止旧任务线程
"
;
removeOldReason
=
"
change job source or glue type, and terminate the old job thread.
"
;
jobThread
=
null
;
jobHandler
=
null
;
...
...
@@ -127,7 +127,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
!(
jobThread
.
getHandler
()
instanceof
ScriptJobHandler
&&
((
ScriptJobHandler
)
jobThread
.
getHandler
()).
getGlueUpdatetime
()==
triggerParam
.
getGlueUpdatetime
()
))
{
// change script or gluesource updated, need kill old thread
removeOldReason
=
"
更新任务逻辑或更换任务模式,终止旧任务线程
"
;
removeOldReason
=
"
change job source or glue type, and terminate the old job thread.
"
;
jobThread
=
null
;
jobHandler
=
null
;
...
...
@@ -147,12 +147,12 @@ public class ExecutorBizImpl implements ExecutorBiz {
if
(
ExecutorBlockStrategyEnum
.
DISCARD_LATER
==
blockStrategy
)
{
// discard when running
if
(
jobThread
.
isRunningOrHasQueue
())
{
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"
阻塞处理策略-生效
:"
+
ExecutorBlockStrategyEnum
.
DISCARD_LATER
.
getTitle
());
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"
block strategy effect
:"
+
ExecutorBlockStrategyEnum
.
DISCARD_LATER
.
getTitle
());
}
}
else
if
(
ExecutorBlockStrategyEnum
.
COVER_EARLY
==
blockStrategy
)
{
// kill running jobThread
if
(
jobThread
.
isRunningOrHasQueue
())
{
removeOldReason
=
"
阻塞处理策略-生效
:"
+
ExecutorBlockStrategyEnum
.
COVER_EARLY
.
getTitle
();
removeOldReason
=
"
block strategy effect
:"
+
ExecutorBlockStrategyEnum
.
COVER_EARLY
.
getTitle
();
jobThread
=
null
;
}
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
浏览文件 @
ff4378e1
...
...
@@ -91,7 +91,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
// destory JobThreadRepository
if
(
JobThreadRepository
.
size
()
>
0
)
{
for
(
Map
.
Entry
<
Integer
,
JobThread
>
item:
JobThreadRepository
.
entrySet
())
{
removeJobThread
(
item
.
getKey
(),
"
Web容器销毁终止
"
);
removeJobThread
(
item
.
getKey
(),
"
web container destroy and kill the job.
"
);
}
JobThreadRepository
.
clear
();
}
...
...
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
浏览文件 @
ff4378e1
...
...
@@ -181,7 +181,7 @@ public class JobThread extends Thread{
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
triggerParam
.
getLogId
(),
triggerParam
.
getLogDateTim
(),
executeResult
));
}
else
{
// is killed
ReturnT
<
String
>
stopResult
=
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
stopReason
+
" [
业务运行中,被强制终止
]"
);
ReturnT
<
String
>
stopResult
=
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
stopReason
+
" [
job running,killed
]"
);
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
triggerParam
.
getLogId
(),
triggerParam
.
getLogDateTim
(),
stopResult
));
}
}
...
...
@@ -193,7 +193,7 @@ public class JobThread extends Thread{
TriggerParam
triggerParam
=
triggerQueue
.
poll
();
if
(
triggerParam
!=
null
)
{
// is killed
ReturnT
<
String
>
stopResult
=
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
stopReason
+
" [
任务尚未执行,在调度队列中被终止
]"
);
ReturnT
<
String
>
stopResult
=
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
stopReason
+
" [
job not executed, in the job queue, killed.
]"
);
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
triggerParam
.
getLogId
(),
triggerParam
.
getLogDateTim
(),
stopResult
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录