Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
tool
/
xxl-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7fa724ba
authored
Oct 02, 2022
by
xuxueli
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update document
1 parent
d7ee76f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 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 @
7fa724b
...
@@ -2256,11 +2256,12 @@ public void execute() {
...
@@ -2256,11 +2256,12 @@ public void execute() {
-
5、【优化】任务线程名优化,提升可读性与问题定位效率(ISSUE-2527)。
-
5、【优化】任务线程名优化,提升可读性与问题定位效率(ISSUE-2527)。
### 7.33 版本 v2.4.0 Release Notes[规划中]
### 7.33 版本 v2.4.0 Release Notes[规划中]
-
1、【优化】
[
规划中
]
任务日志重构:一次调度只记录一条主任务,维护起止时间和状态。
-
1、【优化】执行器任务Bean扫描逻辑优化:解决懒加载注解失效问题。
-
2、【优化】
[
规划中
]
任务日志重构:一次调度只记录一条主任务,维护起止时间和状态。
-
普通任务:只记录一条主任务;
-
普通任务:只记录一条主任务;
-
广播任务:记录一条主任务,每个分片任务记录一条次任务,关联在主任务上;
-
广播任务:记录一条主任务,每个分片任务记录一条次任务,关联在主任务上;
-
重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
-
重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
-
2
、【优化】
[
规划中
]
分片任务:全部完成后才会出发后置节点;
-
3
、【优化】
[
规划中
]
分片任务:全部完成后才会出发后置节点;
### 7.34 版本 v2.4.1 Release Notes[规划中]
### 7.34 版本 v2.4.1 Release Notes[规划中]
-
1、
[
规划中
]
DAG流程任务
-
1、
[
规划中
]
DAG流程任务
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
View file @
7fa724b
...
@@ -3,7 +3,6 @@ package com.xxl.job.core.executor.impl;
...
@@ -3,7 +3,6 @@ package com.xxl.job.core.executor.impl;
import
com.xxl.job.core.executor.XxlJobExecutor
;
import
com.xxl.job.core.executor.XxlJobExecutor
;
import
com.xxl.job.core.glue.GlueFactory
;
import
com.xxl.job.core.glue.GlueFactory
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.impl.MethodJobHandler
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.BeansException
;
...
@@ -85,15 +84,18 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -85,15 +84,18 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
// init job handler from method
// init job handler from method
String
[]
beanDefinitionNames
=
applicationContext
.
getBeanNamesForType
(
Object
.
class
,
false
,
true
);
String
[]
beanDefinitionNames
=
applicationContext
.
getBeanNamesForType
(
Object
.
class
,
false
,
true
);
for
(
String
beanDefinitionName
:
beanDefinitionNames
)
{
for
(
String
beanDefinitionName
:
beanDefinitionNames
)
{
// get bean
Object
bean
=
null
;
Object
bean
=
null
;
Lazy
onBean
=
applicationContext
.
findAnnotationOnBean
(
beanDefinitionName
,
Lazy
.
class
);
Lazy
onBean
=
applicationContext
.
findAnnotationOnBean
(
beanDefinitionName
,
Lazy
.
class
);
if
(
onBean
!=
null
){
if
(
onBean
!=
null
){
logger
.
debug
(
"xxl-job
skip @Lazy Bean:{}"
,
beanDefinitionName
);
logger
.
debug
(
"xxl-job
annotation scan, skip @Lazy Bean:{}"
,
beanDefinitionName
);
continue
;
continue
;
}
else
{
}
else
{
bean
=
applicationContext
.
getBean
(
beanDefinitionName
);
bean
=
applicationContext
.
getBean
(
beanDefinitionName
);
}
}
// filter method
Map
<
Method
,
XxlJob
>
annotatedMethods
=
null
;
// referred to :org.springframework.context.event.EventListenerMethodProcessor.processBean
Map
<
Method
,
XxlJob
>
annotatedMethods
=
null
;
// referred to :org.springframework.context.event.EventListenerMethodProcessor.processBean
try
{
try
{
annotatedMethods
=
MethodIntrospector
.
selectMethods
(
bean
.
getClass
(),
annotatedMethods
=
MethodIntrospector
.
selectMethods
(
bean
.
getClass
(),
...
@@ -110,12 +112,14 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -110,12 +112,14 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
continue
;
continue
;
}
}
// generate and regist method job handler
for
(
Map
.
Entry
<
Method
,
XxlJob
>
methodXxlJobEntry
:
annotatedMethods
.
entrySet
())
{
for
(
Map
.
Entry
<
Method
,
XxlJob
>
methodXxlJobEntry
:
annotatedMethods
.
entrySet
())
{
Method
executeMethod
=
methodXxlJobEntry
.
getKey
();
Method
executeMethod
=
methodXxlJobEntry
.
getKey
();
XxlJob
xxlJob
=
methodXxlJobEntry
.
getValue
();
XxlJob
xxlJob
=
methodXxlJobEntry
.
getValue
();
// regist
// regist
registJobHandler
(
xxlJob
,
bean
,
executeMethod
);
registJobHandler
(
xxlJob
,
bean
,
executeMethod
);
}
}
}
}
}
}
...
@@ -131,4 +135,13 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -131,4 +135,13 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
return
applicationContext
;
return
applicationContext
;
}
}
/*
BeanDefinitionRegistryPostProcessor
registry.getBeanDefine()
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
this.registry = registry;
}
* */
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment