Skip to content

Commit

Permalink
[PAGOPA-2282] refactoring: Sequential stream
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-ang committed Oct 28, 2024
1 parent 924ae47 commit d452397
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ private void deleteAllInBatch(String fdr, List<FdrPaymentInsertEntity> paymentIn
.mapToObj(i -> paymentInsertEntities.subList(i * batchSize, Math.min((i + 1) * batchSize, paymentInsertEntities.size())))
.toList();

batches.parallelStream().forEach(batch -> {
// sequential stream
batches.forEach(batch -> {
List<Long> indexes = paymentInsertEntities.stream().map(FdrPaymentInsertEntity::getIndex).toList();
FdrPaymentInsertEntity.deleteByFdrAndIndexes(fdr, indexes);
});
Expand Down

0 comments on commit d452397

Please sign in to comment.