adamsaghy commented on code in PR #3255:
URL: https://github.com/apache/fineract/pull/3255#discussion_r1229612781


##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java:
##########
@@ -66,14 +98,15 @@ public RepeatStatus execute(@NotNull StepContribution 
contribution, @NotNull Chu
         List<LoanAccountLock> accountLocks = new ArrayList<>();
         loanIdPartitions.forEach(loanIdPartition -> 
accountLocks.addAll(loanLockingService.findAllByLoanIdIn(loanIdPartition)));
 
-        List<Long> alreadyLockedByChunkProcessingAccountIds = 
accountLocks.stream()
-                .filter(e -> 
LockOwner.LOAN_COB_CHUNK_PROCESSING.equals(e.getLockOwner())).map(LoanAccountLock::getLoanId).toList();
+        Predicate<LoanAccountLock> isLocked = e -> 
LockOwner.LOAN_COB_CHUNK_PROCESSING.equals(e.getLockOwner())
+                || 
LockOwner.LOAN_INLINE_COB_PROCESSING.equals(e.getLockOwner());
 
         List<Long> toBeProcessedLoanIds = new ArrayList<>(loanIds);
-        
toBeProcessedLoanIds.removeAll(alreadyLockedByChunkProcessingAccountIds);
+        List<Long> alreadyLockedByChunkProcessingOrInlineCOBAccountIds = 
accountLocks.stream().filter(isLocked)

Review Comment:
   This can be removed. Every entry in the accountLocks means its locked and we 
dont need any filtering...



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