ruanwenjun commented on code in PR #16566:
URL: 
https://github.com/apache/dolphinscheduler/pull/16566#discussion_r1742889252


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/dependent/DependentLogicTask.java:
##########
@@ -72,34 +70,24 @@ public DependentLogicTask(TaskExecutionContext 
taskExecutionContext,
 
     @Override
     public AsyncTaskExecuteFunction getAsyncTaskExecuteFunction() {
-        return new DependentAsyncTaskExecuteFunction(taskExecutionContext,
+        dependentAsyncTaskExecuteFunction = new 
DependentAsyncTaskExecuteFunction(taskExecutionContext,
                 taskParameters,
                 projectDao,
                 workflowDefinitionDao,
                 taskDefinitionDao,
                 taskInstanceDao,
                 workflowInstanceDao);
+        return dependentAsyncTaskExecuteFunction;
     }
 
     @Override
     public void pause() throws MasterTaskExecuteException {
-        if (workflowExecutionRunnable == null) {
-            log.error("Cannot find the WorkflowExecuteRunnable");
-            return;
-        }
-        TaskInstance taskInstance = workflowExecutionRunnable
-                .getWorkflowExecuteContext()
-                .getWorkflowExecutionGraph()
-                
.getTaskExecutionRunnableById(taskExecutionContext.getTaskInstanceId())
-                .getTaskInstance();
-        if (taskInstance == null) {
-            log.error("Cannot find the TaskInstance in 
workflowExecuteRunnable");
-            return;
-        }
-        taskInstance.setState(TaskExecutionStatus.PAUSE);
-        taskInstance.setEndTime(new Date());
-        taskInstanceDao.upsertTaskInstance(taskInstance);
-        super.pause();
+        // todo: support pause

Review Comment:
   Yes, will use https://github.com/apache/dolphinscheduler/issues/16577 to fix 
this.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to