changed config
This commit is contained in:
13
scheduler.py
13
scheduler.py
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
ACH file processing scheduler.
|
||||
NEFT file processing scheduler.
|
||||
Runs polling loop every 30 minutes to process new files.
|
||||
"""
|
||||
|
||||
@@ -79,10 +79,7 @@ class Scheduler:
|
||||
# Get list of files already processed for this specific bank
|
||||
bank_processed = repository.get_processed_files(bank_code)
|
||||
remote_path = f"{self.config.sftp_base_path}/{bank_code}/NEFT"
|
||||
# ach_files = sftp_client.list_files(remote_path, pattern=f'ACH_99944_{today_str}*.txt')
|
||||
# uih_files = sftp_client.list_files(remote_path, pattern=f'UIH_99944_{today_str}*.txt')
|
||||
# files= ach_files + uih_files
|
||||
|
||||
|
||||
|
||||
pattern = f"{today_str}_*_NEFT_INWARD.TXT"
|
||||
files = sftp_client.list_files(remote_path, pattern=pattern)
|
||||
@@ -112,9 +109,9 @@ class Scheduler:
|
||||
logger.info(f" Successful: {stats['successful']}")
|
||||
logger.info(f" Failed: {stats['failed']}")
|
||||
|
||||
# Call ach_api_txn_post procedure once per cycle to process all inserted transactions
|
||||
# Call neft_api_txn_post procedure once per cycle to process all inserted transactions
|
||||
if stats['successful'] > 0:
|
||||
logger.info("Calling ach_api_txn_post procedure for all inserted transactions...")
|
||||
logger.info("Calling neft_api_txn_post procedure for all inserted transactions...")
|
||||
if repository.call_neft_api_txn_post():
|
||||
logger.info("Transaction post-processing completed successfully")
|
||||
else:
|
||||
@@ -129,7 +126,7 @@ class Scheduler:
|
||||
def run(self):
|
||||
"""Run scheduler main loop."""
|
||||
logger.info("="*80)
|
||||
logger.info("ACH File Processing Scheduler Started")
|
||||
logger.info("NEFT_INWARD File Processing Scheduler Started")
|
||||
logger.info(f"Poll Interval: {self.config.poll_interval_minutes} minutes")
|
||||
logger.info(f"Bank Codes: {', '.join(self.config.bank_codes)}")
|
||||
logger.info("="*80)
|
||||
|
||||
Reference in New Issue
Block a user