From ff5a5bcd4ac9237d2ed449d847781a5e56cc6109 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Mon, 8 May 2017 17:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=BF=90=E8=A1=8C=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=B1=9E=E6=80=A7=E6=94=B9=E4=B8=BA=E5=8F=AA=E8=AF=BB?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/admin/service/impl/XxlJobServiceImpl.java | 14 ++++---------- .../WEB-INF/template/jobinfo/jobinfo.index.ftl | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java index c9d3a5e6..19cbac97 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java @@ -151,13 +151,6 @@ public class XxlJobServiceImpl implements IXxlJobService { return new ReturnT(500, "路由策略非法"); } - if (GlueTypeEnum.match(jobInfo.getGlueType()) == null) { - return new ReturnT(500, "运行模式非法非法"); - } - if (GlueTypeEnum.BEAN==GlueTypeEnum.match(jobInfo.getGlueType()) && StringUtils.isBlank(jobInfo.getExecutorHandler())) { - return new ReturnT(500, "请输入“JobHandler”"); - } - // childJobKey valid if (StringUtils.isNotBlank(jobInfo.getChildJobKey())) { String[] childJobKeys = jobInfo.getChildJobKey().split(","); @@ -187,13 +180,14 @@ public class XxlJobServiceImpl implements IXxlJobService { exists_jobInfo.setExecutorRouteStrategy(jobInfo.getExecutorRouteStrategy()); exists_jobInfo.setExecutorHandler(jobInfo.getExecutorHandler()); exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam()); - exists_jobInfo.setGlueType(jobInfo.getGlueType()); exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey()); xxlJobInfoDao.update(exists_jobInfo); + // fresh quartz + String qz_group = String.valueOf(exists_jobInfo.getJobGroup()); + String qz_name = String.valueOf(exists_jobInfo.getId()); try { - // fresh quartz - boolean ret = XxlJobDynamicScheduler.rescheduleJob(String.valueOf(exists_jobInfo.getJobGroup()), String.valueOf(exists_jobInfo.getId()), exists_jobInfo.getJobCron()); + boolean ret = XxlJobDynamicScheduler.rescheduleJob(qz_group, qz_name, exists_jobInfo.getJobCron()); return ret?ReturnT.SUCCESS:ReturnT.FAIL; } catch (SchedulerException e) { logger.error("", e); diff --git a/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl b/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl index fd2e0e73..25928a0d 100644 --- a/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl +++ b/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl @@ -264,7 +264,7 @@ logging.info("脚本文件:" + sys.argv[0])
- <#list GlueTypeEnum as item>