Browse Source

The task timeout need deletes the child process

pull/2/head
lgcareer 6 years ago
parent
commit
c8662bd836
  1. 7
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/AbstractCommandExecutor.java

7
escheduler-server/src/main/java/cn/escheduler/server/worker/task/AbstractCommandExecutor.java

@ -162,7 +162,12 @@ public abstract class AbstractCommandExecutor {
exitStatusCode = updateState(processDao, exitStatusCode, pid, taskInstId);
} else {
cancelApplication();
TaskInstance taskInstance = processDao.findTaskInstanceById(taskInstId);
if (taskInstance == null) {
logger.error("task instance id:{} not exist", taskInstId);
} else {
ProcessUtils.kill(taskInstance);
}
exitStatusCode = -1;
logger.warn("process timeout, work dir:{}, pid:{}", taskDir, pid);
}

Loading…
Cancel
Save