From da6d5432f350a92913469f79f6bf0c7b5ab9d7bc Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Mon, 18 Feb 2019 12:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=9A=82=E5=81=9C=E3=80=81?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BC=98=E5=8C=96=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?quartz=20delete=E4=B8=8D=E5=AE=8C=E6=95=B4=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=84=8F=E6=95=B0=E6=8D=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 1 + .../admin/core/schedule/XxlJobDynamicScheduler.java | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 56b38abd..c94e018f 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1420,6 +1420,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 6、底层Log调优,应用正常终止取消异常栈信息打印; - 7、交互优化,尽量避免新开页面窗口;仅WebIDE支持新开页,并提供窗口快速关闭按钮; - 8、[测试中]底层通讯方案优化:升级较新版本xxl-rpc,由"JETTY"方案调整为"NETTY_HTTP"方案,执行器内嵌netty-http-server提供服务,调度中心复用容器端口提供服务; +- 9、[测试中]任务暂停、删除优化,避免quartz delete不完整导致任务脏数据; - [迭代中]注册中心优化,实时性注册发现:心跳注册间隔10s,refresh失败则首次注册并立即更新注册信息,心跳类似;30s过期销毁; - [迭代中]脚本任务,支持数据参数,新版本仅支持单参数不支持需要兼容; - [迭代中]提供执行器Docker镜像; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/schedule/XxlJobDynamicScheduler.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/schedule/XxlJobDynamicScheduler.java index 215c6c9e..7e83ba26 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/schedule/XxlJobDynamicScheduler.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/schedule/XxlJobDynamicScheduler.java @@ -230,7 +230,7 @@ public final class XxlJobDynamicScheduler { // 5、schedule job Date date = scheduler.scheduleJob(jobDetail, cronTrigger); - logger.info(">>>>>>>>>>> addJob success, jobDetail:{}, cronTrigger:{}, date:{}", jobDetail, cronTrigger, date); + logger.info(">>>>>>>>>>> addJob success(quartz), jobDetail:{}, cronTrigger:{}, date:{}", jobDetail, cronTrigger, date); return true; } @@ -245,13 +245,15 @@ public final class XxlJobDynamicScheduler { */ public static boolean removeJob(String jobName, String jobGroup) throws SchedulerException { - TriggerKey triggerKey = TriggerKey.triggerKey(jobName, jobGroup); + JobKey jobKey = new JobKey(jobName, jobGroup); + scheduler.deleteJob(jobKey); + /*TriggerKey triggerKey = TriggerKey.triggerKey(jobName, jobGroup); if (scheduler.checkExists(triggerKey)) { scheduler.unscheduleJob(triggerKey); // trigger + job - } + }*/ - logger.info(">>>>>>>>>>> removeJob success, triggerKey:{}", triggerKey); + logger.info(">>>>>>>>>>> removeJob success(quartz), triggerKey:{}", jobKey); return true; }