config changes
This commit is contained in:
@@ -84,7 +84,7 @@ class Repository:
|
||||
skipped_count += 1
|
||||
|
||||
if not valid_transactions:
|
||||
logger.debug(f"All {skipped_count} transactions skipped (invalid beneficiary accounts)")
|
||||
logger.info(f"All {skipped_count} transactions skipped (invalid beneficiary accounts)")
|
||||
return 0, skipped_count
|
||||
|
||||
conn = self.connector.get_connection()
|
||||
@@ -96,7 +96,7 @@ class Repository:
|
||||
logger.info(batch_data)
|
||||
|
||||
insert_sql = """
|
||||
INSERT INTO inward_neft_api_log (
|
||||
INSERT INTO pacs_db.inward_neft_api_log (
|
||||
TXNIND,
|
||||
JRNL_ID,
|
||||
BANKCODE,
|
||||
@@ -140,13 +140,17 @@ class Repository:
|
||||
"""
|
||||
|
||||
cursor.executemany(insert_sql, batch_data)
|
||||
logger.info(f"executemany rowcount: {cursor.rowcount}")
|
||||
logger.info('about to commit the transactions')
|
||||
conn.commit()
|
||||
logger.info('connection committed successfully')
|
||||
|
||||
inserted_count = len(valid_transactions)
|
||||
logger.info(f"Inserted {inserted_count} NEFT transactions into inward_neft_api_log")
|
||||
return inserted_count, skipped_count
|
||||
|
||||
except Exception as e:
|
||||
logger.info('inside catch block while inserting rows')
|
||||
if conn:
|
||||
conn.rollback()
|
||||
logger.error(f"Error inserting NEFT transactions: {e}", exc_info=True)
|
||||
@@ -310,4 +314,4 @@ class Repository:
|
||||
finally:
|
||||
if cursor:
|
||||
cursor.close()
|
||||
conn.close()
|
||||
conn.close()
|
||||
|
||||
Reference in New Issue
Block a user