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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]