Skip to content

Commit

Permalink
Fix Journal Entries for Savings Accrual Transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
IOhacker committed Oct 8, 2024
1 parent fc7bcdc commit f2cdc87
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon

long start = System.currentTimeMillis();

log.debug("Reading Savings Account Data!");
log.error("Reading Savings Account Data!");
List<SavingsAccountData> savingsAccounts = savingAccountReadPlatformService
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxSavingsIdInList);

if (savingsAccounts != null && savingsAccounts.size() > 0) {
savingsAccounts = Collections.synchronizedList(savingsAccounts);
long finish = System.currentTimeMillis();
log.debug("Done fetching Data within {} milliseconds", finish - start);
log.error("Done fetching Data within {} milliseconds", finish - start);
queue.add(savingsAccounts);

if (!CollectionUtils.isEmpty(queue)) {
do {
int totalFilteredRecords = savingsAccounts.size();
log.debug("Starting Interest posting - total records - {}", totalFilteredRecords);
log.error("Starting Interest posting - total records - {}", totalFilteredRecords);
List<SavingsAccountData> queueElement = queue.element();
maxSavingsIdInList = queueElement.get(queueElement.size() - 1).getId();
postInterest(queue.remove(), threadPoolSize, backdatedTxnsAllowedTill, pageSize, maxSavingsIdInList);
Expand Down Expand Up @@ -124,7 +124,7 @@ private void postInterest(List<SavingsAccountData> savingsAccounts, int threadPo
}

while (queue.size() <= QUEUE_SIZE) {
log.debug("Fetching while threads are running!");
log.error("Fetching while threads are running!");
List<SavingsAccountData> savingsAccountDataList = Collections.synchronizedList(this.savingAccountReadPlatformService
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
if (savingsAccountDataList.isEmpty()) {
Expand Down

0 comments on commit f2cdc87

Please sign in to comment.