zhanguohao commented on a change in pull request #5552:
URL: https://github.com/apache/dolphinscheduler/pull/5552#discussion_r641342936



##########
File path: 
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
##########
@@ -449,12 +449,15 @@ public static String getPidsStr(int processId) throws 
Exception {
                         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());

Review comment:
       mv 
`FileUtils.createWorkDirIfAbsent(taskExecutionContext.getExecutePath()); `
   to if outside




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to