The task timeout need deletes the child process

This commit is contained in:
lgcareer 2019-07-18 12:55:59 +08:00
parent cf149c1b76
commit c8662bd836

View File

@ -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);
}