You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "adamsaghy (via GitHub)" <gi...@apache.org> on 2023/05/24 12:24:14 UTC
[GitHub] [fineract] adamsaghy commented on a diff in pull request #3200: FINERACT-1678-loan-cob-drop-softlocking-use-lastclosedbusinessdate
adamsaghy commented on code in PR #3200:
URL: https://github.com/apache/fineract/pull/3200#discussion_r1204026361
##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java:
##########
@@ -69,18 +66,11 @@ public RepeatStatus execute(@NotNull StepContribution contribution, @NotNull Chu
List<LoanAccountLock> accountLocks = new ArrayList<>();
loanIdPartitions.forEach(loanIdPartition -> accountLocks.addAll(loanLockingService.findAllByLoanIdIn(loanIdPartition)));
- Map<Long, LoanAccountLock> alreadySoftLockedAccountsMap = accountLocks.stream()
- .filter(e -> LockOwner.LOAN_COB_PARTITIONING.equals(e.getLockOwner()))
- .collect(Collectors.toMap(LoanAccountLock::getLoanId, Function.identity()));
-
List<Long> alreadyLockedByChunkProcessingAccountIds = accountLocks.stream()
.filter(e -> LockOwner.LOAN_COB_CHUNK_PROCESSING.equals(e.getLockOwner())).map(LoanAccountLock::getLoanId).toList();
- List<Long> toBeProcessedLoanIds = new ArrayList<>(alreadySoftLockedAccountsMap.keySet());
-
- loanLockingService.upgradeLock(toBeProcessedLoanIds, LockOwner.LOAN_COB_CHUNK_PROCESSING);
Review Comment:
we should not remove applying hard lock on the loans!
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org