From 9e4f2c6b1ec678954e935974607894471a0ce0c6 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Fri, 10 Mar 2017 16:07:10 +0800 Subject: [PATCH] Clean Code --- README.md | 1 + .../xxl/job/admin/controller/JobInfoController.java | 10 ++++------ .../java/com/xxl/job/admin/service/IXxlJobService.java | 5 ++--- .../xxl/job/admin/service/impl/XxlJobServiceImpl.java | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 70eea6cb..3b15ed00 100644 --- a/README.md +++ b/README.md @@ -716,6 +716,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 2、线程模型统一; - 3、执行器支持手动设置执行地址列表,提供开关切换使用注册地址还是手动设置的地址; - 4、执行器路由规则:第一个、循环、随机、顺序故障(默认)转移; +- 5、CleanCode,清理无效的历史参数; #### TODO LIST - 1、支持脚本JOB(源码或指定路径), 即shell/python/php等, 日志实时输出并支持在线监控;定制JobHandler实现; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java index 586636d2..2cdf91c2 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java @@ -49,22 +49,20 @@ public class JobInfoController { @RequestMapping("/add") @ResponseBody public ReturnT add(int jobGroup, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAppname, String executorAddress, String executorHandler, String executorParam, - int glueSwitch, String glueSource, String glueRemark, String childJobKey) { + String executorHandler, String executorParam, int glueSwitch, String glueSource, String glueRemark, String childJobKey) { return xxlJobService.add(jobGroup, jobCron, jobDesc, author, alarmEmail, - executorAddress, executorHandler, executorParam, + executorHandler, executorParam, glueSwitch, glueSource, glueRemark, childJobKey); } @RequestMapping("/reschedule") @ResponseBody public ReturnT reschedule(int jobGroup, String jobName, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAppname, String executorAddress, String executorHandler, String executorParam, - int glueSwitch, String childJobKey) { + String executorHandler, String executorParam, int glueSwitch, String childJobKey) { return xxlJobService.reschedule(jobGroup, jobName, jobCron, jobDesc, author, alarmEmail, - executorAddress, executorHandler, executorParam, glueSwitch, childJobKey); + executorHandler, executorParam, glueSwitch, childJobKey); } @RequestMapping("/remove") diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/IXxlJobService.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/IXxlJobService.java index 727c906a..1a3695c5 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/IXxlJobService.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/IXxlJobService.java @@ -15,11 +15,10 @@ public interface IXxlJobService { public Map pageList(int start, int length, int jobGroup, String executorHandler, String filterTime); public ReturnT add(int jobGroup, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAddress, String executorHandler, String executorParam, - int glueSwitch, String glueSource, String glueRemark, String childJobKey); + String executorHandler, String executorParam, int glueSwitch, String glueSource, String glueRemark, String childJobKey); public ReturnT reschedule(int jobGroup, String jobName, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAddress, String executorHandler, String executorParam, int glueSwitch, String childJobKey); + String executorHandler, String executorParam, int glueSwitch, String childJobKey); public ReturnT remove(int jobGroup, String jobName); 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 77b63609..64a4ecc0 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 @@ -65,7 +65,7 @@ public class XxlJobServiceImpl implements IXxlJobService { @Override public ReturnT add(int jobGroup, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAddress, String executorHandler, String executorParam, + String executorHandler, String executorParam, int glueSwitch, String glueSource, String glueRemark, String childJobKey) { // valid XxlJobGroup group = xxlJobGroupDao.load(jobGroup); @@ -146,7 +146,7 @@ public class XxlJobServiceImpl implements IXxlJobService { @Override public ReturnT reschedule(int jobGroup, String jobName, String jobCron, String jobDesc, String author, String alarmEmail, - String executorAddress, String executorHandler, String executorParam, int glueSwitch, String childJobKey) { + String executorHandler, String executorParam, int glueSwitch, String childJobKey) { // valid XxlJobGroup group = xxlJobGroupDao.load(jobGroup);