Skip to content

Commit

Permalink
resume subtasks
Browse files Browse the repository at this point in the history
  • Loading branch information
snagasawa committed Dec 20, 2023
1 parent 703d50f commit faf9d38
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions digdag-core/src/main/java/io/digdag/core/workflow/TaskControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ private static long addTasks(TaskControlStore store,
firstTask = false;
}

List<String> taskNames = tasks.stream().map(t-> t.getFullName()).collect(Collectors.toList());

resumingTasks
.stream()
.filter(resumingTask -> !taskNames.contains(resumingTask.getFullName()))
.forEach(resumingTask -> {
store.addResumedSubtask(attemptId,
resumingTask.getParentId().get(),
resumingTask.getTaskType(),
TaskStateCode.SUCCESS,
(isInitialTask ? TaskStateFlags.empty().withInitialTask() : TaskStateFlags.empty()),
resumingTask);
});

return rootTaskId;
}

Expand Down

0 comments on commit faf9d38

Please sign in to comment.