From a92c836e70df452c8b6744639c79eb54a14903f3 Mon Sep 17 00:00:00 2001 From: Shane Frischkorn Date: Fri, 4 Feb 2022 11:19:50 +1000 Subject: [PATCH] Increasing timeout for waiting for file download --- converter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/converter.py b/converter.py index 332f010..d8ed547 100644 --- a/converter.py +++ b/converter.py @@ -139,19 +139,19 @@ class Handler(watchdog.events.PatternMatchingEventHandler): time.sleep(1) timeout += 1 - if timeout > 10: + if timeout > 60: logging.error('Timeout waiting for file {} to exist. Aborting processing.'.format(event.src_path)) return historicalSize = -1 while (historicalSize != os.path.getsize(event.src_path)): - historicalSize = os.path.getsize(event.src_path) logging.info('waiting for copy to finish....') + historicalSize = os.path.getsize(event.src_path) time.sleep(1) - logging.info("file copy has now finished") + + logging.info("file copy has now finished") with open(event.src_path, 'r') as file: - qfx = OfxParser.parse(file, fail_fast=False) statement, acct_name = Handler.get_statement_from_qfx(qfx)