Skip to content

Commit

Permalink
Fix WorkersByJobId: Filtered Workers Not Empty Check (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmg-stripe authored Jul 31, 2024
1 parent ef3ad82 commit a293400
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,11 @@ private Map<String, List<MantisWorkerMetadataWritable>> getAllWorkersByJobId(fin
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
workersByJobId
.computeIfAbsent(workers.get(0).getJobId(), k -> Lists.newArrayList())
.addAll(workers);
if(!workers.isEmpty()) {
workersByJobId
.computeIfAbsent(workers.get(0).getJobId(), k -> Lists.newArrayList())
.addAll(workers);
}
}
return workersByJobId;
}
Expand Down

0 comments on commit a293400

Please sign in to comment.