FINERACT-857: Fixing scheduler integration tests and migrating to executeAndAwaitJob (#1049)
Co-authored-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
This commit is contained in:
co-authored by
Michael Vorburger ⛑️
parent
3564f98689
commit
e8ecd79b9d
+1
@@ -2928,6 +2928,7 @@ public class SavingsAccount extends AbstractPersistableCustom {
|
||||
transactions.size();
|
||||
charges.size();
|
||||
savingsOfficerHistory.size();
|
||||
if(group != null) { Office dummyOffice = group.getOffice(); } // Ensure lazy loading of group if set
|
||||
}
|
||||
|
||||
public void updateSavingsAccountSummary(final List<SavingsAccountTransaction> transactions) {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public interface SavingsAccountChargeRepository extends JpaRepository<SavingsAcc
|
||||
JpaSpecificationExecutor<SavingsAccountCharge> {
|
||||
|
||||
@Query("select sac from SavingsAccountCharge sac where sac.id =:id and sac.savingsAccount.id = :savingsAccountId")
|
||||
SavingsAccountCharge findByIdAndSavingsAccountId(Long id, Long savingsAccountId);
|
||||
SavingsAccountCharge findByIdAndSavingsAccountId(@Param("id") Long id, @Param("savingsAccountId") Long savingsAccountId);
|
||||
|
||||
@Query("select sac from SavingsAccountCharge sac where sac.dueDate <=:transactionDate and sac.waived = 0 and sac.paid=0 order by sac.dueDate")
|
||||
List<SavingsAccountCharge> findPendingCharges(@Param("transactionDate") Date transactionDate);
|
||||
|
||||
+5
-2
@@ -229,7 +229,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
|
||||
LOG.error("Apply annual fee failed for account: {} with message {}", savingsAccountReference.getAccountNo(), error);
|
||||
}
|
||||
} catch (final Exception ex) {
|
||||
// need to handle this scenario
|
||||
LOG.error("Apply annual fee failed for account: {}", savingsAccountReference.getAccountNo(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,9 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
|
||||
for (final ApiParameterError error : errors) {
|
||||
LOG.error("Apply Charges due for savings failed for account {} with message: {}", savingsAccountReference.getAccountNo(), error.getDeveloperMessage(), e);
|
||||
}
|
||||
} catch (final Exception ex) {
|
||||
exceptions.add(ex);
|
||||
LOG.error("Apply Charges due for savings failed for account: {}", savingsAccountReference.getAccountNo(), ex);
|
||||
}
|
||||
}
|
||||
LOG.info("{}: Savings accounts affected by update: {}", ThreadLocalContextUtil.getTenant().getName(), chargesDueData.size());
|
||||
@@ -307,7 +310,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
|
||||
LOG.error("Update maturity details failed for account: {} with message {}", depositAccount.accountNo(), error.getDeveloperMessage());
|
||||
}
|
||||
} catch (final Exception ex) {
|
||||
// need to handle this scenario
|
||||
LOG.error("Update maturity details failed for account: {}", depositAccount.accountNo(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user