Skip to content

Commit

Permalink
Merge pull request #293 from rq-dbrady/d.brady/IsolationGroupsForkJoin
Browse files Browse the repository at this point in the history
[FEATURE]: Fork/Join Task Isolation Groups
  • Loading branch information
v1r3n authored Oct 22, 2024
2 parents 71b5e62 + 6bf92f8 commit fde0b34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -78,6 +79,10 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext)
forkTask.setEndTime(epochMillis);
forkTask.setInputData(taskInput);
forkTask.setStatus(TaskModel.Status.COMPLETED);
if (Objects.nonNull(taskMapperContext.getTaskDefinition())) {
forkTask.setIsolationGroupId(
taskMapperContext.getTaskDefinition().getIsolationGroupId());
}

tasksToBeScheduled.add(forkTask);
List<List<WorkflowTask>> forkTasks = workflowTask.getForkTasks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -65,6 +66,10 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext) {
joinTask.setStartTime(System.currentTimeMillis());
joinTask.setInputData(joinInput);
joinTask.setStatus(TaskModel.Status.IN_PROGRESS);
if (Objects.nonNull(taskMapperContext.getTaskDefinition())) {
joinTask.setIsolationGroupId(
taskMapperContext.getTaskDefinition().getIsolationGroupId());
}

return List.of(joinTask);
}
Expand Down

0 comments on commit fde0b34

Please sign in to comment.