adamsaghy commented on code in PR #4164:
URL: https://github.com/apache/fineract/pull/4164#discussion_r1840713075
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTasklet.java:
##########
@@ -104,14 +111,40 @@ private void markEventsAsSent(List<Long> eventIds) {
// Partitioning dataset to avoid exception: PreparedStatement can have
at most 65,535 parameters
final int partitionSize =
fineractProperties.getEvents().getExternal().getPartitionSize();
List<List<Long>> partitions = Lists.partition(eventIds, partitionSize);
+ final ThreadPoolTaskExecutor executor = getThreadPoolTaskExecutor();
+ final FineractContext context = ThreadLocalContextUtil.getContext();
+ List<Future<?>> tasks = new ArrayList<>();
partitions //
.forEach(partitionedEventIds -> {
Review Comment:
Have you considered parallel stream instead of foreach?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]