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
26659331
authored
Mar 29, 2020
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
执行器初始化逻辑优化:修复懒加载的Bean被提前初始化问题;
parent
9fd8e1eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
doc/XXL-JOB官方文档.md
View file @
26659331
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
...
@@ -1728,12 +1728,13 @@ method: get 或 post
data: post-data
```
-
15、执行器注册逻辑优化:新增配置项 ”注册地址 / xxl.job.executor.address“,优先使用该配置作为注册地址,为空时使用内嵌服务 ”IP:PORT“ 作为注册地址。从而更灵活的支持容器类型执行器动态IP和动态映射端口问题。
-
16、
[
迭代中
]
自定义失败重试时间间隔;
-
17、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息;
-
18、
[
迭代中
]
新增执行器描述、任务描述属性;
-
19、
[
迭代中
]
任务执行一次的时候指定IP;
-
20、
[
迭代中
]
任务日志支持单个清理和状态转移,方便触发子任务;
-
21、
[
迭代中
]
任务结果丢失处理:针对长期处于运行中的任务(设置过期时间时,运行超过"过期时间+1min";未设置超时时间时,运行超过"30min"),主动检测该执行器是否在线,如果不在线主动标记失败;
-
16、执行器初始化逻辑优化:修复懒加载的Bean被提前初始化问题;
-
17、
[
迭代中
]
自定义失败重试时间间隔;
-
18、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息;
-
19、
[
迭代中
]
新增执行器描述、任务描述属性;
-
20、
[
迭代中
]
任务执行一次的时候指定IP;
-
21、
[
迭代中
]
任务日志支持单个清理和状态转移,方便触发子任务;
-
22、
[
迭代中
]
任务结果丢失处理:针对长期处于运行中的任务(设置过期时间时,运行超过"过期时间+1min";未设置超时时间时,运行超过"30min"),主动检测该执行器是否在线,如果不在线主动标记失败;
### TODO LIST
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
View file @
26659331
...
...
@@ -9,7 +9,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.DisposableBean
;
import
org.springframework.beans.factory.
InitializingBea
n
;
import
org.springframework.beans.factory.
SmartInitializingSingleto
n
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.core.MethodIntrospector
;
...
...
@@ -24,13 +24,13 @@ import java.util.Map;
*
* @author xuxueli 2018-11-01 09:24:52
*/
public
class
XxlJobSpringExecutor
extends
XxlJobExecutor
implements
ApplicationContextAware
,
InitializingBea
n
,
DisposableBean
{
public
class
XxlJobSpringExecutor
extends
XxlJobExecutor
implements
ApplicationContextAware
,
SmartInitializingSingleto
n
,
DisposableBean
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
XxlJobSpringExecutor
.
class
);
// start
@Override
public
void
after
PropertiesSet
()
throws
Exception
{
public
void
after
SingletonsInstantiated
()
{
// init JobHandler Repository
/*initJobHandlerRepository(applicationContext);*/
...
...
@@ -42,7 +42,11 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
GlueFactory
.
refreshInstance
(
1
);
// super start
super
.
start
();
try
{
super
.
start
();
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
// destroy
...
...
@@ -93,7 +97,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
});
}
catch
(
Throwable
ex
)
{
logger
.
debug
(
"xxl-job method-jobhandler resolve error for bean["
+
beanDefinitionName
+
"]."
,
ex
);
logger
.
error
(
"xxl-job method-jobhandler resolve error for bean["
+
beanDefinitionName
+
"]."
,
ex
);
}
if
(
annotatedMethods
==
null
||
annotatedMethods
.
isEmpty
())
{
continue
;
...
...
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