执行器,server启动、销毁和注册逻辑调整;
This commit is contained in:
parent
14767e30e6
commit
882d7a43e9
19
README.md
19
README.md
|
@ -809,20 +809,19 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
|
|||
|
||||
#### 6.15 版本 V1.7.1 特性(Coding)
|
||||
- 1、运行日志读写编码统一,解决windows环境下日志乱码问题;
|
||||
- 2、通讯超时时间设置为10s,避免异常情况下调度线程占用;
|
||||
- 3、JettyServer关闭逻辑优化,修复执行器无法正常关闭的问题;
|
||||
- 4、JobHandler中开启子线程时,支持子线程输出执行日志并通过Rolling查看。
|
||||
- 2、通讯超时时间限定为10s,避免异常情况下调度线程占用;
|
||||
- 3、执行器,server启动、销毁和注册逻辑调整;
|
||||
- 4、JettyServer关闭逻辑优化,修复执行器无法正常关闭导致端口占用和频繁打印c3p0日志的问题;
|
||||
- 5、JobHandler中开启子线程时,支持子线程输出执行日志并通过Rolling查看。
|
||||
|
||||
#### TODO LIST
|
||||
- 1、任务并行触发处理规则:单机串行队列(默认)、单机并行、串行忽略、单机覆盖;
|
||||
- 2、任务权限管理;
|
||||
- 3、执行器,server启动,注册逻辑调整;
|
||||
- 4、调度失败重试机制;
|
||||
- 5、JobHandler开启多线程时,支持记录执行日志;
|
||||
- 6、执行器与数据库解耦,只需配置调度中心集群地址即可(与当前通过JDBC注册自动发现方式,相冲突,待考虑);
|
||||
- 7、任务日志定期清理功能,支持设置日志上限;
|
||||
- 8、任务分片:一个任务被拆分成N个独立的任务单元,然后由分布式部署的执行器分别执行某一个或几个分片单元;
|
||||
- 9、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;
|
||||
- 3、调度失败重试机制;
|
||||
- 4、执行器与数据库解耦,只需配置调度中心集群地址即可(与当前通过JDBC注册自动发现方式,相冲突,待考虑);
|
||||
- 5、任务日志定期清理功能,支持设置日志上限;
|
||||
- 6、任务分片:一个任务被拆分成N个独立的任务单元,然后由分布式部署的执行器分别执行某一个或几个分片单元;
|
||||
- 7、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;
|
||||
|
||||
|
||||
## 七、其他
|
||||
|
|
|
@ -60,10 +60,13 @@ public class XxlJobExecutor implements ApplicationContextAware, ApplicationListe
|
|||
TriggerCallbackThread.getInstance().start();
|
||||
}
|
||||
public void destroy(){
|
||||
// executor stop
|
||||
// 1、executor registry thread stop
|
||||
ExecutorRegistryThread.getInstance().toStop();
|
||||
|
||||
// 2、executor stop
|
||||
serverFactory.destroy();
|
||||
|
||||
// job thread repository destory
|
||||
// 3、job thread repository destory
|
||||
if (JobThreadRepository.size() > 0) {
|
||||
for (Map.Entry<Integer, JobThread> item: JobThreadRepository.entrySet()) {
|
||||
JobThread jobThread = item.getValue();
|
||||
|
@ -74,11 +77,8 @@ public class XxlJobExecutor implements ApplicationContextAware, ApplicationListe
|
|||
JobThreadRepository.clear();
|
||||
}
|
||||
|
||||
// trigger callback thread stop
|
||||
// 4、trigger callback thread stop
|
||||
TriggerCallbackThread.getInstance().toStop();
|
||||
|
||||
// executor registry thread stop
|
||||
ExecutorRegistryThread.getInstance().toStop();
|
||||
}
|
||||
|
||||
// ---------------------------------- init job handler ------------------------------------
|
||||
|
|
Loading…
Reference in New Issue