mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
⬆️ Upgrading dependencies. xxl-job 2.4.0
This commit is contained in:
1 parent
c0f7da40f7
commit
498d9e422b
163 files changed
+64
-203
No files matched your search
@@ -10,6 +10,9 @@
|
||||
<artifactId>pigx-xxl-job-admin</artifactId>
|
||||
<description>xxl job admin 控制台内置方便开发</description>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<mybatis-spring-boot-starter.version>2.3.0</mybatis-spring-boot-starter.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
@@ -56,7 +59,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>${mybatis-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -64,8 +67,8 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- xxl-job-core -->
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.xxl.job.admin.config;
|
||||
|
||||
import com.xxl.job.admin.core.conf.XxlJobAdminConfig;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import org.springframework.boot.web.context.WebServerInitializedEvent;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.event.EventListener;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2022/2/28
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class XxlJobInitConfiguration {
|
||||
|
||||
private final XxlJobAdminConfig xxlJobAdminConfig;
|
||||
|
||||
@SneakyThrows
|
||||
@EventListener({ WebServerInitializedEvent.class })
|
||||
public void init() {
|
||||
xxlJobAdminConfig.getXxlJobScheduler().init();
|
||||
}
|
||||
|
||||
}
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+7
@@ -1,5 +1,6 @@
|
||||
package com.xxl.job.admin.controller;
|
||||
|
||||
import com.xxl.job.admin.controller.annotation.PermissionLimit;
|
||||
import com.xxl.job.admin.core.model.XxlJobGroup;
|
||||
import com.xxl.job.admin.core.model.XxlJobRegistry;
|
||||
import com.xxl.job.admin.core.util.I18nUtil;
|
||||
@@ -37,12 +38,14 @@ public class JobGroupController {
|
||||
private XxlJobRegistryDao xxlJobRegistryDao;
|
||||
|
||||
@RequestMapping
|
||||
@PermissionLimit(adminuser = true)
|
||||
public String index(Model model) {
|
||||
return "jobgroup/jobgroup.index";
|
||||
}
|
||||
|
||||
@RequestMapping("/pageList")
|
||||
@ResponseBody
|
||||
@PermissionLimit(adminuser = true)
|
||||
public Map<String, Object> pageList(HttpServletRequest request,
|
||||
@RequestParam(required = false, defaultValue = "0") int start,
|
||||
@RequestParam(required = false, defaultValue = "10") int length, String appname, String title) {
|
||||
@@ -61,6 +64,7 @@ public class JobGroupController {
|
||||
|
||||
@RequestMapping("/save")
|
||||
@ResponseBody
|
||||
@PermissionLimit(adminuser = true)
|
||||
public ReturnT<String> save(XxlJobGroup xxlJobGroup) {
|
||||
|
||||
// valid
|
||||
@@ -107,6 +111,7 @@ public class JobGroupController {
|
||||
|
||||
@RequestMapping("/update")
|
||||
@ResponseBody
|
||||
@PermissionLimit(adminuser = true)
|
||||
public ReturnT<String> update(XxlJobGroup xxlJobGroup) {
|
||||
// valid
|
||||
if (xxlJobGroup.getAppname() == null || xxlJobGroup.getAppname().trim().length() == 0) {
|
||||
@@ -177,6 +182,7 @@ public class JobGroupController {
|
||||
|
||||
@RequestMapping("/remove")
|
||||
@ResponseBody
|
||||
@PermissionLimit(adminuser = true)
|
||||
public ReturnT<String> remove(int id) {
|
||||
|
||||
// valid
|
||||
@@ -196,6 +202,7 @@ public class JobGroupController {
|
||||
|
||||
@RequestMapping("/loadById")
|
||||
@ResponseBody
|
||||
@PermissionLimit(adminuser = true)
|
||||
public ReturnT<XxlJobGroup> loadById(int id) {
|
||||
XxlJobGroup jobGroup = xxlJobGroupDao.load(id);
|
||||
return jobGroup != null ? new ReturnT<XxlJobGroup>(jobGroup)
|
||||
|
||||
Executable → Regular
+2
@@ -1,5 +1,6 @@
|
||||
package com.xxl.job.admin.controller;
|
||||
|
||||
import com.xxl.job.admin.core.cron.CronExpression;
|
||||
import com.xxl.job.admin.core.exception.XxlJobException;
|
||||
import com.xxl.job.admin.core.model.XxlJobGroup;
|
||||
import com.xxl.job.admin.core.model.XxlJobInfo;
|
||||
@@ -28,6 +29,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
||||
Executable → Regular
+12
-6
@@ -138,23 +138,29 @@ public class JobLogController {
|
||||
|
||||
model.addAttribute("triggerCode", jobLog.getTriggerCode());
|
||||
model.addAttribute("handleCode", jobLog.getHandleCode());
|
||||
model.addAttribute("executorAddress", jobLog.getExecutorAddress());
|
||||
model.addAttribute("triggerTime", jobLog.getTriggerTime().getTime());
|
||||
model.addAttribute("logId", jobLog.getId());
|
||||
return "joblog/joblog.detail";
|
||||
}
|
||||
|
||||
@RequestMapping("/logDetailCat")
|
||||
@ResponseBody
|
||||
public ReturnT<LogResult> logDetailCat(String executorAddress, long triggerTime, long logId, int fromLineNum) {
|
||||
public ReturnT<LogResult> logDetailCat(long logId, int fromLineNum) {
|
||||
try {
|
||||
ExecutorBiz executorBiz = XxlJobScheduler.getExecutorBiz(executorAddress);
|
||||
ReturnT<LogResult> logResult = executorBiz.log(new LogParam(triggerTime, logId, fromLineNum));
|
||||
// valid
|
||||
XxlJobLog jobLog = xxlJobLogDao.load(logId); // todo, need to improve
|
||||
// performance
|
||||
if (jobLog == null) {
|
||||
return new ReturnT<LogResult>(ReturnT.FAIL_CODE, I18nUtil.getString("joblog_logid_unvalid"));
|
||||
}
|
||||
|
||||
// log cat
|
||||
ExecutorBiz executorBiz = XxlJobScheduler.getExecutorBiz(jobLog.getExecutorAddress());
|
||||
ReturnT<LogResult> logResult = executorBiz
|
||||
.log(new LogParam(jobLog.getTriggerTime().getTime(), logId, fromLineNum));
|
||||
|
||||
// is end
|
||||
if (logResult.getContent() != null
|
||||
&& logResult.getContent().getFromLineNum() > logResult.getContent().getToLineNum()) {
|
||||
XxlJobLog jobLog = xxlJobLogDao.load(logId);
|
||||
if (jobLog.getHandleCode() > 0) {
|
||||
logResult.getContent().setEnd(true);
|
||||
}
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+3
-2
@@ -3,7 +3,7 @@ package com.xxl.job.admin.controller.interceptor;
|
||||
import com.xxl.job.admin.core.util.FtlUtil;
|
||||
import com.xxl.job.admin.core.util.I18nUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
@@ -17,7 +17,7 @@ import java.util.HashMap;
|
||||
* @author xuxueli 2015-12-12 18:09:04
|
||||
*/
|
||||
@Component
|
||||
public class CookieInterceptor implements HandlerInterceptor {
|
||||
public class CookieInterceptor implements AsyncHandlerInterceptor {
|
||||
|
||||
@Override
|
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
|
||||
@@ -36,6 +36,7 @@ public class CookieInterceptor implements HandlerInterceptor {
|
||||
if (modelAndView != null) {
|
||||
modelAndView.addObject("I18nUtil", FtlUtil.generateStaticModel(I18nUtil.class.getName()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Executable → Regular
+4
-14
@@ -6,12 +6,11 @@ import com.xxl.job.admin.core.util.I18nUtil;
|
||||
import com.xxl.job.admin.service.LoginService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 权限拦截
|
||||
@@ -19,12 +18,7 @@ import java.util.Arrays;
|
||||
* @author xuxueli 2015-12-12 18:09:04
|
||||
*/
|
||||
@Component
|
||||
public class PermissionInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* 针对 spring boot admin 对外暴露的接口
|
||||
*/
|
||||
private static final String[] ACTUATOR_IGNORE = { "/actuator", "/details", "/health" };
|
||||
public class PermissionInterceptor implements AsyncHandlerInterceptor {
|
||||
|
||||
@Resource
|
||||
private LoginService loginService;
|
||||
@@ -34,11 +28,7 @@ public class PermissionInterceptor implements HandlerInterceptor {
|
||||
throws Exception {
|
||||
|
||||
if (!(handler instanceof HandlerMethod)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Arrays.stream(ACTUATOR_IGNORE).anyMatch(s -> request.getRequestURI().contains(s))) {
|
||||
return true;
|
||||
return true; // proceed with the next interceptor
|
||||
}
|
||||
|
||||
// if need login
|
||||
@@ -64,7 +54,7 @@ public class PermissionInterceptor implements HandlerInterceptor {
|
||||
request.setAttribute(LoginService.LOGIN_IDENTITY_KEY, loginUser);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true; // proceed with the next interceptor
|
||||
}
|
||||
|
||||
}
|
||||
Executable → Regular
+1
-1
@@ -26,4 +26,4 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
registry.addInterceptor(cookieInterceptor).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
+2
-2
@@ -1,8 +1,8 @@
|
||||
package com.xxl.job.admin.controller.resolver;
|
||||
|
||||
import com.xxl.job.admin.core.exception.XxlJobException;
|
||||
import com.xxl.job.admin.core.util.JacksonUtil;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.admin.core.util.JacksonUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -66,4 +66,4 @@ public class WebExceptionResolver implements HandlerExceptionResolver {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+1
-1
@@ -46,7 +46,7 @@ public class XxlJobCompleter {
|
||||
|
||||
// 1、handle success, to trigger child job
|
||||
String triggerChildMsg = null;
|
||||
if (XxlJobContext.HANDLE_COCE_SUCCESS == xxlJobLog.getHandleCode()) {
|
||||
if (XxlJobContext.HANDLE_CODE_SUCCESS == xxlJobLog.getHandleCode()) {
|
||||
XxlJobInfo xxlJobInfo = XxlJobAdminConfig.getAdminConfig().getXxlJobInfoDao()
|
||||
.loadById(xxlJobLog.getJobId());
|
||||
if (xxlJobInfo != null && xxlJobInfo.getChildJobId() != null
|
||||
|
||||
Executable → Regular
+2
-6
@@ -37,7 +37,7 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
|
||||
adminConfig = this;
|
||||
|
||||
xxlJobScheduler = new XxlJobScheduler();
|
||||
// xxlJobScheduler.init();
|
||||
xxlJobScheduler.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -54,7 +54,7 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
|
||||
@Value("${xxl.job.accessToken:}")
|
||||
private String accessToken;
|
||||
|
||||
@Value("${spring.mail.from:}")
|
||||
@Value("${spring.mail.from}")
|
||||
private String emailFrom;
|
||||
|
||||
@Value("${xxl.job.triggerpool.fast.max}")
|
||||
@@ -160,8 +160,4 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
|
||||
return jobAlarmer;
|
||||
}
|
||||
|
||||
public XxlJobScheduler getXxlJobScheduler() {
|
||||
return xxlJobScheduler;
|
||||
}
|
||||
|
||||
}
|
||||
Executable → Regular
+14
-9
@@ -19,7 +19,16 @@ package com.xxl.job.admin.core.cron;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.SortedSet;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeSet;
|
||||
|
||||
/**
|
||||
* Provides a parser and evaluator for unix-like cron expressions. Cron expressions
|
||||
@@ -360,9 +369,8 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
// the second immediately following it.
|
||||
while (difference == 1000) {
|
||||
newDate = getTimeAfter(lastDate);
|
||||
if (newDate == null) {
|
||||
if (newDate == null)
|
||||
break;
|
||||
}
|
||||
|
||||
difference = newDate.getTime() - lastDate.getTime();
|
||||
|
||||
@@ -658,9 +666,8 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
if (c == '-') {
|
||||
ValueSet vs = getValue(0, s, i + 1);
|
||||
lastdayOffset = vs.value;
|
||||
if (lastdayOffset > 30) {
|
||||
if (lastdayOffset > 30)
|
||||
throw new ParseException("Offset from last day must be <= 30", i + 1);
|
||||
}
|
||||
i = vs.pos;
|
||||
}
|
||||
if (s.length() > i) {
|
||||
@@ -729,9 +736,8 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
|
||||
if (c == 'L') {
|
||||
if (type == DAY_OF_WEEK) {
|
||||
if (val < 1 || val > 7) {
|
||||
if (val < 1 || val > 7)
|
||||
throw new ParseException("Day-of-Week values must be between 1 and 7", -1);
|
||||
}
|
||||
lastdayOfWeek = true;
|
||||
}
|
||||
else {
|
||||
@@ -750,11 +756,10 @@ public final class CronExpression implements Serializable, Cloneable {
|
||||
else {
|
||||
throw new ParseException("'W' option is not valid here. (pos=" + i + ")", i);
|
||||
}
|
||||
if (val > 31) {
|
||||
if (val > 31)
|
||||
throw new ParseException(
|
||||
"The 'W' option does not make sense with values larger than 31 (max number of days in a month)",
|
||||
i);
|
||||
}
|
||||
TreeSet<Integer> set = getSet(type);
|
||||
set.add(val);
|
||||
i++;
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.xxl.job.admin.core.route.strategy;
|
||||
|
||||
import com.xxl.job.admin.core.route.ExecutorRouter;
|
||||
import com.xxl.job.admin.core.scheduler.XxlJobScheduler;
|
||||
import com.xxl.job.admin.core.route.ExecutorRouter;
|
||||
import com.xxl.job.admin.core.util.I18nUtil;
|
||||
import com.xxl.job.core.biz.ExecutorBiz;
|
||||
import com.xxl.job.core.biz.model.IdleBeatParam;
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.xxl.job.admin.core.route.strategy;
|
||||
|
||||
import com.xxl.job.admin.core.route.ExecutorRouter;
|
||||
import com.xxl.job.admin.core.scheduler.XxlJobScheduler;
|
||||
import com.xxl.job.admin.core.route.ExecutorRouter;
|
||||
import com.xxl.job.admin.core.util.I18nUtil;
|
||||
import com.xxl.job.core.biz.ExecutorBiz;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
pigx-visual/pigx-xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java
Executable → Regular
+1
-2
@@ -71,8 +71,7 @@ public class JobFailMonitorHelper {
|
||||
|
||||
// 2、fail alarm monitor
|
||||
int newAlarmStatus = 0; // 告警状态:0-默认、-1=锁定状态、1-无需告警、2-告警成功、3-告警失败
|
||||
if (info != null && info.getAlarmEmail() != null
|
||||
&& info.getAlarmEmail().trim().length() > 0) {
|
||||
if (info != null) {
|
||||
boolean alarmResult = XxlJobAdminConfig.getAdminConfig().getJobAlarmer().alarm(info,
|
||||
log);
|
||||
newAlarmStatus = alarmResult ? 2 : 3;
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
-1
@@ -3,7 +3,6 @@ package com.xxl.job.admin.dao;
|
||||
import com.xxl.job.admin.core.model.XxlJobUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
@@ -1 +0,0 @@
|
||||
INSERT INTO `xxl_job_user` VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
|
||||
@@ -1,116 +0,0 @@
|
||||
DROP TABLE IF EXISTS `xxl_job_info` ;
|
||||
CREATE TABLE `xxl_job_info`
|
||||
(
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`job_group` int(11) NOT NULL COMMENT '执行器主键ID',
|
||||
`job_desc` varchar(255) NOT NULL,
|
||||
`add_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`author` varchar(64) DEFAULT NULL COMMENT '作者',
|
||||
`alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
|
||||
`schedule_type` varchar(50) NOT NULL DEFAULT 'NONE' COMMENT '调度类型',
|
||||
`schedule_conf` varchar(128) DEFAULT NULL COMMENT '调度配置,值含义取决于调度类型',
|
||||
`misfire_strategy` varchar(50) NOT NULL DEFAULT 'DO_NOTHING' COMMENT '调度过期策略',
|
||||
`executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
|
||||
`executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
|
||||
`executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
|
||||
`executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
|
||||
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
||||
`glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
|
||||
`glue_source` mediumtext COMMENT 'GLUE源代码',
|
||||
`glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
|
||||
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
|
||||
`child_jobid` varchar(255) DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
|
||||
`trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '调度状态:0-停止,1-运行',
|
||||
`trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次调度时间',
|
||||
`trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次调度时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_log`;
|
||||
CREATE TABLE `xxl_job_log`
|
||||
(
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`job_group` int(11) NOT NULL COMMENT '执行器主键ID',
|
||||
`job_id` int(11) NOT NULL COMMENT '任务,主键ID',
|
||||
`executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
|
||||
`executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
|
||||
`executor_param` varchar(512) DEFAULT NULL COMMENT '执行器任务参数',
|
||||
`executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
|
||||
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失败重试次数',
|
||||
`trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
|
||||
`trigger_code` int(11) NOT NULL COMMENT '调度-结果',
|
||||
`trigger_msg` text COMMENT '调度-日志',
|
||||
`handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
|
||||
`handle_code` int(11) NOT NULL COMMENT '执行-状态',
|
||||
`handle_msg` text COMMENT '执行-日志',
|
||||
`alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `I_trigger_time` (`trigger_time`),
|
||||
KEY `I_handle_code` (`handle_code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_log_report`;
|
||||
CREATE TABLE `xxl_job_log_report`
|
||||
(
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`trigger_day` datetime DEFAULT NULL COMMENT '调度-时间',
|
||||
`running_count` int(11) NOT NULL DEFAULT '0' COMMENT '运行中-日志数量',
|
||||
`suc_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
|
||||
`fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_logglue`;
|
||||
CREATE TABLE `xxl_job_logglue` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`job_id` int(11) NOT NULL COMMENT '任务,主键ID',
|
||||
`glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
|
||||
`glue_source` mediumtext COMMENT 'GLUE源代码',
|
||||
`glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
|
||||
`add_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_registry`;
|
||||
CREATE TABLE `xxl_job_registry` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`registry_group` varchar(50) NOT NULL,
|
||||
`registry_key` varchar(255) NOT NULL,
|
||||
`registry_value` varchar(255) NOT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_group`;
|
||||
CREATE TABLE `xxl_job_group` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
|
||||
`title` varchar(12) NOT NULL COMMENT '执行器名称',
|
||||
`address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
|
||||
`address_list` text COMMENT '执行器地址列表,多地址逗号分隔',
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_user`;
|
||||
CREATE TABLE `xxl_job_user` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(50) NOT NULL COMMENT '账号',
|
||||
`password` varchar(50) NOT NULL COMMENT '密码',
|
||||
`role` tinyint(4) NOT NULL COMMENT '角色:0-普通用户、1-管理员',
|
||||
`permission` varchar(255) DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `i_username` (`username`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP TABLE IF EXISTS `xxl_job_lock`;
|
||||
CREATE TABLE `xxl_job_lock` (
|
||||
`lock_name` varchar(50) NOT NULL COMMENT '锁名称',
|
||||
PRIMARY KEY (`lock_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Executable → Regular
+1
-1
@@ -1,6 +1,6 @@
|
||||
admin_name=Scheduling Center
|
||||
admin_name_full=Distributed Task Scheduling Platform XXL-JOB
|
||||
admin_version=2.3.0
|
||||
admin_version=2.4.0
|
||||
admin_i18n=en
|
||||
|
||||
## system
|
||||
|
||||
Executable → Regular
+1
-1
@@ -1,6 +1,6 @@
|
||||
admin_name=任务调度中心
|
||||
admin_name_full=分布式任务调度平台XXL-JOB
|
||||
admin_version=2.3.0
|
||||
admin_version=2.4.0
|
||||
admin_i18n=
|
||||
|
||||
## system
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
admin_name=任務調度中心
|
||||
admin_name_full=分布式任務調度平臺XXL-JOB
|
||||
admin_version=2.3.0
|
||||
admin_version=2.4.0
|
||||
admin_i18n=
|
||||
|
||||
## system
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
+1
-1
@@ -229,7 +229,7 @@
|
||||
|
||||
<select id="findFailJobLogIds" resultType="long" >
|
||||
SELECT id FROM `xxl_job_log`
|
||||
WHERE not (
|
||||
WHERE !(
|
||||
(trigger_code in (0, 200) and handle_code = 0)
|
||||
OR
|
||||
(handle_code = 200)
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
+2
-2
@@ -22,7 +22,7 @@
|
||||
<select id="findDead" parameterType="java.util.HashMap" resultType="java.lang.Integer" >
|
||||
SELECT t.id
|
||||
FROM xxl_job_registry AS t
|
||||
WHERE t.update_time <![CDATA[ < ]]> TIMESTAMPADD(SECOND,-#{timeout},#{nowTime})
|
||||
WHERE t.update_time <![CDATA[ < ]]> DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
|
||||
</select>
|
||||
|
||||
<delete id="removeDead" parameterType="java.lang.Integer" >
|
||||
@@ -36,7 +36,7 @@
|
||||
<select id="findAll" parameterType="java.util.HashMap" resultMap="XxlJobRegistry">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM xxl_job_registry AS t
|
||||
WHERE t.update_time <![CDATA[ > ]]> TIMESTAMPADD(SECOND,-#{timeout},#{nowTime})
|
||||
WHERE t.update_time <![CDATA[ > ]]> DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
|
||||
</select>
|
||||
|
||||
<update id="registryUpdate" >
|
||||
|
||||
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 326 KiB |
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Vendored
Executable → Regular
File mode changed.
Loaded 100 of 163 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user