Skip to content

Commit

Permalink
Merge 84ba2b3 into ad7ce2d
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphgj authored Mar 30, 2023
2 parents ad7ce2d + 84ba2b3 commit aac9a02
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ private List<WorkerGroup> getWorkerGroups(List<Integer> ids) {
} else {
workerGroups = workerGroupMapper.queryAllWorkerGroup();
}
Optional<Boolean> containDefaultWorkerGroups = workerGroups.stream()
.map(workerGroup -> Constants.DEFAULT_WORKER_GROUP.equals(workerGroup.getName())).findAny();
if (!containDefaultWorkerGroups.isPresent() || !containDefaultWorkerGroups.get()) {
boolean containDefaultWorkerGroups = workerGroups.stream()
.anyMatch(workerGroup -> Constants.DEFAULT_WORKER_GROUP.equals(workerGroup.getName()));
if (!containDefaultWorkerGroups) {
// there doesn't exist a default WorkerGroup, we will add all worker to the default worker group.
Set<String> activeWorkerNodes = registryClient.getServerNodeSet(NodeType.WORKER);
WorkerGroup defaultWorkerGroup = new WorkerGroup();
Expand Down

0 comments on commit aac9a02

Please sign in to comment.