adamsaghy commented on code in PR #4503:
URL: https://github.com/apache/fineract/pull/4503#discussion_r2013635727
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java:
##########
@@ -143,13 +154,34 @@ public void addPeriodicAccruals(@NotNull LocalDate
tillDate, @NotNull Loan loan)
public void addAccruals(@NotNull LocalDate tillDate) throws
JobExecutionException {
List<Loan> loans =
loanRepositoryWrapper.findLoansForAddAccrual(AccountingRuleType.ACCRUAL_PERIODIC,
tillDate,
!isChargeOnDueDate());
+
+ List<Future<?>> loanTasks = new ArrayList<>();
+
+ FineractContext context = ThreadLocalContextUtil.getContext();
+
+ loans.forEach(outerLoan -> {
+ loanTasks.add(taskExecutor.submit(() -> {
+ ThreadLocalContextUtil.init(context);
Review Comment:
Please reset the ThreadLocalContextUtil context once you finished
--
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]