taskain7 commented on code in PR #3253:
URL: https://github.com/apache/fineract/pull/3253#discussion_r1229225669


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanTasklet.java:
##########
@@ -91,8 +91,8 @@ public RepeatStatus execute(StepContribution contribution, 
ChunkContext chunkCon
 
     private void recalculateInterest(OfficeData office, int threadPoolSize, 
int batchSize) {
         final int pageSize = batchSize * threadPoolSize;
-
-        final ExecutorService executorService = 
Executors.newFixedThreadPool(threadPoolSize);
+        taskExecutor.setCorePoolSize(threadPoolSize);

Review Comment:
   a configurable task executor has been made, which is a prototype bean



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java:
##########
@@ -55,15 +55,18 @@ public class PostInterestForSavingTasklet implements 
Tasklet {
     private final ConfigurationDomainService configurationDomainService;
     private final Queue<List<SavingsAccountData>> queue = new ArrayDeque<>();
     private final ApplicationContext applicationContext;
+    @Qualifier("fineractDefaultThreadPoolTaskExecutor")
+    private final ThreadPoolTaskExecutor taskExecutor;
     private final int queueSize = 1;
 
     @Override
     public RepeatStatus execute(StepContribution contribution, ChunkContext 
chunkContext) throws Exception {
         final int threadPoolSize = Integer.parseInt((String) 
chunkContext.getStepContext().getJobParameters().get("thread-pool-size"));
+        taskExecutor.setCorePoolSize(threadPoolSize);

Review Comment:
   a configurable task executor has been made, which is a prototype bean



-- 
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]

Reply via email to