Commit 93e84720 authored by 黎博's avatar 黎博

修改字段名称

parent 0e816633
......@@ -31,7 +31,7 @@ public class QuartzInitRunner implements ApplicationRunner {
public void run(ApplicationArguments args) {
List<MonitorTask> monitorTaskList = monitorTaskService.list();
for (MonitorTask monitorTask: monitorTaskList) {
if (monitorTask.getInitStart() == 1) {
if (monitorTask.getStatus() == 1) {
QuartzUtils.createScheduleJob(scheduler, monitorTask);
}
}
......
......@@ -56,10 +56,10 @@ public class MonitorTask {
private String dingText;
/**
* 是否项目初始化时启动,0-不启动,1-启动
* 状态,0-禁用,1-启用
*/
@TableField(value = "init_start")
private Integer initStart;
@TableField(value = "`status`")
private Integer status;
/**
* 业务线
......
......@@ -20,11 +20,11 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 数据库查询
* SQL定时任务
* @author libo
*/
@Slf4j
public class DbQueryTask extends QuartzJobBean {
public class SqlMonitorTask extends QuartzJobBean {
@Autowired
MonitorDataSourceService monitorDataSourceService;
......
......@@ -22,7 +22,7 @@ public class QuartzUtils {
.build();
scheduler.scheduleJob(jobDetail, cronTrigger);
} catch (ClassNotFoundException e) {
log.info("定时任务类路径出错:请输入类的绝对路径");
log.info("定时任务类: {}路径出错:请输入类的绝对路径", monitorTask.getTaskClass());
} catch (SchedulerException e) {
log.info("创建定时任务出错:" + e.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment