feat: 任务管理

This commit is contained in:
taojinlong 2021-07-08 14:12:30 +08:00
parent 00202fa718
commit 4ee8896a4f
2 changed files with 3 additions and 7 deletions

View File

@ -42,10 +42,6 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
} else {
scheduleService.addSchedule(task);
}
} else {
if(StringUtils.equalsIgnoreCase(task.getStatus(), TaskStatus.Underway.toString())){
scheduleService.addSchedule(task);
}
}
} catch (Exception e) {
e.printStackTrace();

View File

@ -5,10 +5,10 @@ ALTER TABLE `dataset_table_task`
ADD COLUMN `status` VARCHAR(50) NULL DEFAULT NULL COMMENT '任务状态' AFTER `last_exec_time`,
ADD COLUMN `last_exec_status` VARCHAR(50) NULL DEFAULT NULL COMMENT '上次执行结果' AFTER `last_exec_time`;
update dataset_table_task set status='Underway' where rate='CRON';
update dataset_table_task set status='Stopped' where rate='SIMPLE_COMPLETE';
update dataset_table_task set status='Underway';
update dataset_table_task set rate='SIMPLE' where rate='SIMPLE_COMPLETE';
ALTER TABLE `dataset_table_task_log` ADD COLUMN `trigger_type` VARCHAR(45) NULL AFTER `create_time`;
update dataset_table_task_log set trigger_type='Cron';