You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/03/15 04:13:51 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a change in pull request #8584: [Feature-8579][Task] Task back-end plugin optimization, new plugins only need to modify the plugin's own module

caishunfeng commented on a change in pull request #8584:
URL: https://github.com/apache/dolphinscheduler/pull/8584#discussion_r826565122



##########
File path: dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/builder/TaskExecutionContextBuilder.java
##########
@@ -69,7 +66,7 @@ public TaskExecutionContextBuilder buildTaskInstanceRelatedInfo(TaskInstance tas
     public TaskExecutionContextBuilder buildTaskDefinitionRelatedInfo(TaskDefinition taskDefinition) {
         taskExecutionContext.setTaskTimeout(Integer.MAX_VALUE);
         if (taskDefinition.getTimeoutFlag() == TimeoutFlag.OPEN) {
-            taskExecutionContext.setTaskTimeoutStrategy(taskDefinition.getTimeoutNotifyStrategy());
+            taskExecutionContext.setTaskTimeoutStrategy(org.apache.dolphinscheduler.spi.enums.TaskTimeoutStrategy.of(taskDefinition.getTimeoutNotifyStrategy().getCode()));

Review comment:
       Should it unified the `TaskTimeoutStrategy`?

##########
File path: dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java
##########
@@ -100,11 +98,10 @@ public void killTaskBeforeExecuteByInstanceId(Integer taskInstanceId) {
      * kill task before execute , like delay task
      */
     private void sendTaskKillResponse(Integer taskInstanceId) {
-        TaskRequest taskRequest = TaskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId);
-        if (taskRequest == null) {
+        TaskExecutionContext taskExecutionContext = TaskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId);

Review comment:
       good!




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org