Skip to content

Commit

Permalink
任务操作逻辑优化,修复边界情况下逻辑中断问题(ISSUE-2081)。
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxueli committed Feb 7, 2025
1 parent 8b07bc3 commit ab5f20f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/XXL-JOB官方文档.md
Original file line number Diff line number Diff line change
Expand Up @@ -2461,8 +2461,9 @@ public void execute() {
- b、从该版本(v3.0.x)开始基于 SpringBoot3 + JDK17 构建,
### 7.38 版本 v3.0.1 Release Notes[规划中]
- 1、[规划中]登陆态Token生成逻辑优化,混淆登陆时间属性,降低token泄漏风险;
- 2、[规划中]组件扫描改为BeanPostProcessor方式,避免小概率情况下提前初始化;底层组件移除单例写法,汇总factory统一管理;
- 1、【修复】任务操作逻辑优化,修复边界情况下逻辑中断问题(ISSUE-2081)。
- 2、[规划中]登陆态Token生成逻辑优化,混淆登陆时间属性,降低token泄漏风险;
- 3、[规划中]组件扫描改为BeanPostProcessor方式,避免小概率情况下提前初始化;底层组件移除单例写法,汇总factory统一管理;
### TODO LIST
- 1、调度隔离:调度中心针对不同执行器,各自维护不同的调度和远程触发组件。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ public ReturnT<String> remove(int id) {

@Override
public ReturnT<String> start(int id) {
// load and valid
XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(id);
if (xxlJobInfo == null) {
return new ReturnT<String>(ReturnT.FAIL.getCode(), I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
}

// valid
ScheduleTypeEnum scheduleTypeEnum = ScheduleTypeEnum.match(xxlJobInfo.getScheduleType(), ScheduleTypeEnum.NONE);
Expand Down Expand Up @@ -352,8 +356,13 @@ public ReturnT<String> start(int id) {

@Override
public ReturnT<String> stop(int id) {
// load and valid
XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(id);
if (xxlJobInfo == null) {
return new ReturnT<String>(ReturnT.FAIL.getCode(), I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
}

// stop
xxlJobInfo.setTriggerStatus(0);
xxlJobInfo.setTriggerLastTime(0);
xxlJobInfo.setTriggerNextTime(0);
Expand Down

0 comments on commit ab5f20f

Please sign in to comment.