From 9bba8428f1b49e12b91f7d4255056e01c3fb8947 Mon Sep 17 00:00:00 2001 From: hubin Date: Sun, 14 Jul 2019 23:29:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobs/core/model/TriggerParam.java | 4 ---- .../jobs/starter/entity/JobsInfo.java | 16 ------------- .../jobs/starter/trigger/JobsTrigger.java | 7 ------ jobs.sql | 23 +++++-------------- 4 files changed, 6 insertions(+), 44 deletions(-) diff --git a/jobs-core/src/main/java/com/baomidou/jobs/core/model/TriggerParam.java b/jobs-core/src/main/java/com/baomidou/jobs/core/model/TriggerParam.java index f6164a6..03ea0dc 100755 --- a/jobs-core/src/main/java/com/baomidou/jobs/core/model/TriggerParam.java +++ b/jobs-core/src/main/java/com/baomidou/jobs/core/model/TriggerParam.java @@ -20,8 +20,4 @@ public class TriggerParam implements Serializable{ private int logId; private long logDateTim; - private String glueType; - private String glueSource; - private long glueTime; - } diff --git a/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/entity/JobsInfo.java b/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/entity/JobsInfo.java index 0e9712f..5a63c39 100644 --- a/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/entity/JobsInfo.java +++ b/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/entity/JobsInfo.java @@ -53,22 +53,6 @@ public class JobsInfo implements Serializable { * 失败重试次数 */ private Integer failRetryCount; - /** - * GLUE 类型 #GlueTypeEnum - */ - private String glueType; - /** - * GLUE 源代码 - */ - private String glueSource; - /** - * GLUE 备注 - */ - private String glueRemark; - /** - * GLUE 更新时间 - */ - private Timestamp glueTime; /** * 上次调度时间 */ diff --git a/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/trigger/JobsTrigger.java b/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/trigger/JobsTrigger.java index 46a9673..6f70ae6 100644 --- a/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/trigger/JobsTrigger.java +++ b/jobs-spring-boot-starter/src/main/java/com/baomidou/jobs/starter/trigger/JobsTrigger.java @@ -85,13 +85,6 @@ private static boolean processTrigger(JobsInfo jobsInfo, int finalFailRetryCount triggerParam.setExecutorTimeout(jobsInfo.getTimeout()); triggerParam.setLogId(jobLog.getId()); triggerParam.setLogDateTim(jobLog.getTriggerTime().getTime()); - triggerParam.setGlueType(jobsInfo.getGlueType()); - triggerParam.setGlueSource(jobsInfo.getGlueSource()); - Date glueTime = jobsInfo.getGlueTime(); - if (null != glueTime) { - triggerParam.setGlueTime(glueTime.getTime()); - } - // 3、init address String routeAddressResultMsg = ""; diff --git a/jobs.sql b/jobs.sql index e1c1f41..efc9bf9 100644 --- a/jobs.sql +++ b/jobs.sql @@ -11,7 +11,7 @@ Target Server Version : 80012 File Encoding : 65001 - Date: 14/07/2019 22:56:39 + Date: 14/07/2019 23:12:05 */ SET NAMES utf8mb4; @@ -31,10 +31,6 @@ CREATE TABLE `jobs_info` ( `block_strategy` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '阻塞处理策略', `timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒', `fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数', - `glue_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'GLUE类型', - `glue_source` mediumtext COMMENT 'GLUE源代码', - `glue_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'GLUE备注', - `glue_time` datetime DEFAULT NULL COMMENT 'GLUE更新时间', `last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次调度时间', `next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次调度时间', `author` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '作者', @@ -44,13 +40,13 @@ CREATE TABLE `jobs_info` ( `create_time` datetime NOT NULL, `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='任务信息'; -- ---------------------------- -- Records of jobs_info -- ---------------------------- BEGIN; -INSERT INTO `jobs_info` VALUES (3, 'jobs-executor-sample', '0/10 * * * * ? *', 'demoJobHandler', NULL, 'FIRST', 'SERIAL_EXECUTION', 30, 3, 'BEAN', 'GLUE代码初始化', NULL, NULL, 1563116100000, 1563116110000, 'jobs', 'FIRST', '测试', 0, '2019-07-12 18:12:23', '2019-07-12 18:12:25'); +INSERT INTO `jobs_info` VALUES (3, 'jobs-executor-sample', '0/10 * * * * ? *', 'demoJobHandler', NULL, 'FIRST', 'SERIAL_EXECUTION', 30, 3, 1563116580000, 1563116590000, 'jobs', 'FIRST', '测试', 0, '2019-07-12 18:12:23', '2019-07-12 18:12:25'); COMMIT; -- ---------------------------- @@ -64,7 +60,7 @@ CREATE TABLE `jobs_lock` ( `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), UNIQUE KEY `uidx_name` (`name`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='分布式锁'; +) ENGINE=InnoDB AUTO_INCREMENT=367 DEFAULT CHARSET=utf8 COMMENT='任务锁'; -- ---------------------------- -- Table structure for jobs_log @@ -89,7 +85,7 @@ CREATE TABLE `jobs_log` ( PRIMARY KEY (`id`), KEY `I_trigger_time` (`trigger_time`), KEY `I_handle_code` (`handle_code`) -) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务调度日志'; -- ---------------------------- -- Table structure for jobs_registry @@ -101,13 +97,6 @@ CREATE TABLE `jobs_registry` ( `address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'IP 地址', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=902 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of jobs_registry --- ---------------------------- -BEGIN; -INSERT INTO `jobs_registry` VALUES (901, 'jobs-executor-sample', '192.168.0.2:9999', '2019-07-13 09:46:04'); -COMMIT; +) ENGINE=InnoDB AUTO_INCREMENT=902 DEFAULT CHARSET=utf8 COMMENT='任务注册信息'; SET FOREIGN_KEY_CHECKS = 1;