Commit daf754dc by huangfusuper

kill杀死任务接口

parent 7ff0d8f0
......@@ -22,9 +22,7 @@ public class ProcessManagerController {
public String killJob(Integer logId){
ValidationUtil.dataNotNull(logId, "日志id不允许为空!");
log.info("请求杀死任务,对应logId:【{}】", logId);
MythJobProcess mythJobProcess = JobContentUtil.getJobThread(logId);
ValidationUtil.dataNotNull(mythJobProcess, logId + "已经运行结束或还未调用!");
mythJobProcess.hardKill();
JobContentUtil.kill(logId);
return "SUCCESS";
}
}
......@@ -48,4 +48,10 @@ public class JobContentUtil {
}
}
public static void kill(Integer logId){
MythJobProcess mythJobProcess = JobContentUtil.getJobThread(logId);
ValidationUtil.dataNotNull(mythJobProcess, logId + "已经运行结束或还未调用!");
mythJobProcess.hardKill();
}
}
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