未验证 提交 56273319 编写于 作者: G geosmart 提交者: GitHub

[Bug][Master] remove check with executePath when kill yarn job (#5552)

* [Bug][Master] remove check with executePath when kill yarn job

* [Bug][Master] init execute path if not exist

* [Bug][Master] move createWorkDirIfAbsent out side of executePath calculate  part
Co-authored-by: Nwanggang <wanggy01@servyou.com.cn>
上级 842c5400
......@@ -449,12 +449,15 @@ public class ProcessUtils {
taskExecutionContext.getLogPath());
}
if (StringUtils.isNotEmpty(log)) {
List<String> appIds = LoggerUtils.getAppIds(log, logger);
String workerDir = taskExecutionContext.getExecutePath();
if (StringUtils.isEmpty(workerDir)) {
logger.error("task instance work dir is empty");
throw new RuntimeException("task instance work dir is empty");
if (StringUtils.isEmpty(taskExecutionContext.getExecutePath())) {
taskExecutionContext.setExecutePath(FileUtils.getProcessExecDir(taskExecutionContext.getProjectCode(),
taskExecutionContext.getProcessDefineCode(),
taskExecutionContext.getProcessDefineVersion(),
taskExecutionContext.getProcessInstanceId(),
taskExecutionContext.getTaskInstanceId()));
}
FileUtils.createWorkDirIfAbsent(taskExecutionContext.getExecutePath());
List<String> appIds = LoggerUtils.getAppIds(log, logger);
if (CollectionUtils.isNotEmpty(appIds)) {
cancelApplication(appIds, logger, taskExecutionContext.getTenantCode(), taskExecutionContext.getExecutePath());
return appIds;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册