det101 commented on code in PR #17605:
URL: 
https://github.com/apache/dolphinscheduler/pull/17605#discussion_r2467627015


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/executor/PhysicalTaskEngineDelegator.java:
##########
@@ -74,6 +74,18 @@ public void ackPhysicalTaskExecutorLifecycleEventACK(final 
ITaskExecutorLifecycl
         
physicalTaskExecutorEventReporter.receiveTaskExecutorLifecycleEventACK(taskExecutorLifecycleEventAck);
     }
 
+    public int getWorkflowInstanceId(final int taskInstanceId) {
+        final Optional<ITaskExecutor> taskExecutorOptional = 
physicalTaskExecutorRepository.get(taskInstanceId);
+        if (!taskExecutorOptional.isPresent()) {
+            return 0;
+        }
+        final TaskExecutionContext taskExecutionContext = 
taskExecutorOptional.get().getTaskExecutionContext();
+        if (taskExecutionContext == null) {
+            return 0;
+        }
+        return taskExecutionContext.getWorkflowInstanceId();
+    }

Review Comment:
   The Worker does not need to be aware of the workflowInstanceId, so I will 
delete this method.



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