FINERACT-2394:Fixed Deposits is creating double Interest Postings
This commit is contained in:
committed by
Adam Saghy
parent
8c3c44b618
commit
5c8d86cba5
-16
@@ -166,22 +166,6 @@ public class PostInterestForSavingTasklet implements Tasklet {
|
||||
|
||||
List<Future<Void>> responses = new ArrayList<>();
|
||||
posters.forEach(poster -> responses.add(taskExecutor.submit(poster)));
|
||||
Long maxId = maxSavingsIdInList;
|
||||
if (!queue.isEmpty()) {
|
||||
maxId = Math.max(maxSavingsIdInList, queue.element().get(queue.element().size() - 1).getId());
|
||||
}
|
||||
|
||||
while (queue.size() <= QUEUE_SIZE) {
|
||||
log.debug("Fetching while threads are running!..:: this is not supposed to run........");
|
||||
savingsAccounts = Collections.synchronizedList(this.savingAccountReadPlatformService
|
||||
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
|
||||
if (savingsAccounts.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
maxId = savingsAccounts.get(savingsAccounts.size() - 1).getId();
|
||||
log.debug("Add to the Queue");
|
||||
queue.add(savingsAccounts);
|
||||
}
|
||||
|
||||
checkCompletion(responses);
|
||||
log.debug("Queue size {}", queue.size());
|
||||
|
||||
Reference in New Issue
Block a user