Compare commits

..

5 Commits

Author SHA1 Message Date
VivianDee 2fefb9fdfc Update repayment.py 2026-05-20 13:33:02 +01:00
ameye 7529581ee3 Merge branch 'increase-timeout' of DigiFi/digifi-BankToProductCore into master 2026-04-10 10:17:09 +00:00
VivianDee 64fc119ca7 Update events_service.py 2026-04-10 10:55:09 +01:00
VivianDee d94d104380 [add]: Timeout 2026-04-10 10:41:21 +01:00
ameye ff78788254 Merge branch 'add_last_penal_date' of DigiFi/digifi-BankToProductCore into master 2026-03-12 09:02:30 +00:00
3 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class EventServiceIntegration:
logger.info(f"Health Check URL: {url}")
try:
response = httpx.get(url, timeout=5.0)
response = httpx.get(url, timeout=EventServiceIntegration.TIMEOUT)
logger.info(f"Health Check Response: {response.text}")
return response
except Exception as e:
+16 -14
View File
@@ -62,24 +62,26 @@ class RepaymentService(BaseService):
if response.status_code != 200:
return ResponseHelper.error(result_description="Balance Check failed")
response = response.json()
try:
response = response.json()
except Exception as e:
logger.error(f"Balance Check failed: Invalid JSON response - {str(e)}")
return ResponseHelper.error(result_description="Balance Check failed")
logger.info(f"This is Response (Balance Check): {str(response)}", exc_info=True)
verify_account_balance_response = response.get('isSufficient', None) if response else None
if verify_account_balance_response is None:
return ResponseHelper.error(result_description="Balance Check failed")
if verify_account_balance_response in [False, "false"]:
logger.error("Balance Check failed: Insufficient Account Balance")
return ResponseHelper.error(result_description="Insufficient Account Balance")
if not response or response['responseCode'] != '00':
if response:
logger.error(f"{response['responseMessage']}")
return ResponseHelper.error(result_description=f"Balance Check failed")
verify_account_balance_response = response['isSufficient']
if not verify_account_balance_response or verify_account_balance_response in [False, "false"]:
logger.error(f"Balance Check failed: Insufficient Account Balance")
return ResponseHelper.error(result_description=f"Insufficient Account Balance")
# Save the repayment details
repayment = Repayment.create_repayment(
+1 -1
View File
@@ -21,7 +21,7 @@ def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"loan_repayment_schedules",
sa.Column("last_penal_date", sa.DateTime(), nullable=True),
sa.Column("last_penal_date", sa.Float(), nullable=True),
)
### end Alembic commands ###