From 20a1e1ee4920a6e1e1c8a104558aa0dc0393293e Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Mon, 2 Nov 2020 20:37:49 +0800 Subject: [PATCH] upgrade --- doc/XXL-JOB官方文档.md | 2 +- .../xxl/job/admin/controller/JobLogController.java | 4 ++-- .../XxlJobCompleter.java} | 6 +++--- .../job/admin/core/scheduler/XxlJobScheduler.java | 4 ++-- .../{JobLogHelper.java => JobCompleteHelper.java} | 14 +++++++------- .../xxl/job/admin/service/impl/AdminBizImpl.java | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) rename xxl-job-admin/src/main/java/com/xxl/job/admin/core/{handle/XxlJobPostHandleHelper.java => complete/XxlJobCompleter.java} (97%) rename xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/{JobLogHelper.java => JobCompleteHelper.java} (92%) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 1a66ffb1..e6efd286 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -2086,7 +2086,7 @@ data: post-data - 20、执行器注册组件优化:注册逻辑调整为异步方式,提高注册性能; - 21、调度过期策略:调度中心错误调度时间的补偿处理策略,包括:忽略、立即补偿触发一次等; - 22、触发策略强化:除了常规Cron、API、父子任务触发方式外,新增提供 "固定间隔触发、固定延时触发" 两种新触发方式; -- 23、任务调度生命周期重构:调度(schedule)、触发(trigger)、执行(handle)、回调(callback)、后处理(posthandle); +- 23、任务调度生命周期重构:调度(schedule)、触发(trigger)、执行(handle)、回调(callback)、结束(complete); - 24、执行器鉴权校验:执行器启动时主动校验accessToken,为空则主动Warn告警;(已规划安全强化:AccessToken动态生成、动态启停等) ### 7.32 版本 v2.3.0 Release Notes[规划中] diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java index b570ffea..dcf5bb83 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java @@ -1,7 +1,7 @@ package com.xxl.job.admin.controller; import com.xxl.job.admin.core.exception.XxlJobException; -import com.xxl.job.admin.core.handle.XxlJobPostHandleHelper; +import com.xxl.job.admin.core.complete.XxlJobCompleter; import com.xxl.job.admin.core.model.XxlJobGroup; import com.xxl.job.admin.core.model.XxlJobInfo; import com.xxl.job.admin.core.model.XxlJobLog; @@ -184,7 +184,7 @@ public class JobLogController { log.setHandleCode(ReturnT.FAIL_CODE); log.setHandleMsg( I18nUtil.getString("joblog_kill_log_byman")+":" + (runResult.getMsg()!=null?runResult.getMsg():"")); log.setHandleTime(new Date()); - XxlJobPostHandleHelper.updateHandleInfoAndFinish(log); + XxlJobCompleter.updateHandleInfoAndFinish(log); return new ReturnT(runResult.getMsg()); } else { return new ReturnT(500, runResult.getMsg()); diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/handle/XxlJobPostHandleHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/complete/XxlJobCompleter.java similarity index 97% rename from xxl-job-admin/src/main/java/com/xxl/job/admin/core/handle/XxlJobPostHandleHelper.java rename to xxl-job-admin/src/main/java/com/xxl/job/admin/core/complete/XxlJobCompleter.java index 266df11e..8cfb7571 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/handle/XxlJobPostHandleHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/complete/XxlJobCompleter.java @@ -1,4 +1,4 @@ -package com.xxl.job.admin.core.handle; +package com.xxl.job.admin.core.complete; import com.xxl.job.admin.core.conf.XxlJobAdminConfig; import com.xxl.job.admin.core.model.XxlJobInfo; @@ -16,8 +16,8 @@ import java.text.MessageFormat; /** * @author xuxueli 2020-10-30 20:43:10 */ -public class XxlJobPostHandleHelper { - private static Logger logger = LoggerFactory.getLogger(XxlJobPostHandleHelper.class); +public class XxlJobCompleter { + private static Logger logger = LoggerFactory.getLogger(XxlJobCompleter.class); /** * common fresh handle entrance (limit only once) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/XxlJobScheduler.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/XxlJobScheduler.java index 555105b6..bb2cda8b 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/XxlJobScheduler.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/scheduler/XxlJobScheduler.java @@ -34,7 +34,7 @@ public class XxlJobScheduler { JobFailMonitorHelper.getInstance().start(); // admin lose-monitor run ( depend on JobTriggerPoolHelper ) - JobLogHelper.getInstance().start(); + JobCompleteHelper.getInstance().start(); // admin log report start JobLogReportHelper.getInstance().start(); @@ -55,7 +55,7 @@ public class XxlJobScheduler { JobLogReportHelper.getInstance().toStop(); // admin lose-monitor stop - JobLogHelper.getInstance().toStop(); + JobCompleteHelper.getInstance().toStop(); // admin fail-monitor stop JobFailMonitorHelper.getInstance().toStop(); diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobLogHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobCompleteHelper.java similarity index 92% rename from xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobLogHelper.java rename to xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobCompleteHelper.java index cf5048fa..f24b1d50 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobLogHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobCompleteHelper.java @@ -1,7 +1,7 @@ package com.xxl.job.admin.core.thread; import com.xxl.job.admin.core.conf.XxlJobAdminConfig; -import com.xxl.job.admin.core.handle.XxlJobPostHandleHelper; +import com.xxl.job.admin.core.complete.XxlJobCompleter; import com.xxl.job.admin.core.model.XxlJobLog; import com.xxl.job.admin.core.util.I18nUtil; import com.xxl.job.core.biz.model.HandleCallbackParam; @@ -20,11 +20,11 @@ import java.util.concurrent.*; * * @author xuxueli 2015-9-1 18:05:56 */ -public class JobLogHelper { - private static Logger logger = LoggerFactory.getLogger(JobLogHelper.class); +public class JobCompleteHelper { + private static Logger logger = LoggerFactory.getLogger(JobCompleteHelper.class); - private static JobLogHelper instance = new JobLogHelper(); - public static JobLogHelper getInstance(){ + private static JobCompleteHelper instance = new JobCompleteHelper(); + public static JobCompleteHelper getInstance(){ return instance; } @@ -89,7 +89,7 @@ public class JobLogHelper { jobLog.setHandleCode(ReturnT.FAIL_CODE); jobLog.setHandleMsg( I18nUtil.getString("joblog_lost_fail") ); - XxlJobPostHandleHelper.updateHandleInfoAndFinish(jobLog); + XxlJobCompleter.updateHandleInfoAndFinish(jobLog); } } @@ -175,7 +175,7 @@ public class JobLogHelper { log.setHandleTime(new Date()); log.setHandleCode(handleCallbackParam.getExecuteResult().getCode()); log.setHandleMsg(handleMsg.toString()); - XxlJobPostHandleHelper.updateHandleInfoAndFinish(log); + XxlJobCompleter.updateHandleInfoAndFinish(log); return ReturnT.SUCCESS; } diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java index f728f56f..3c01e94d 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java @@ -1,6 +1,6 @@ package com.xxl.job.admin.service.impl; -import com.xxl.job.admin.core.thread.JobLogHelper; +import com.xxl.job.admin.core.thread.JobCompleteHelper; import com.xxl.job.admin.core.thread.JobRegistryHelper; import com.xxl.job.core.biz.AdminBiz; import com.xxl.job.core.biz.model.HandleCallbackParam; @@ -19,7 +19,7 @@ public class AdminBizImpl implements AdminBiz { @Override public ReturnT callback(List callbackParamList) { - return JobLogHelper.getInstance().callback(callbackParamList); + return JobCompleteHelper.getInstance().callback(callbackParamList); } @Override