From 02666af9102270edc714ddde233f7c347bf040d3 Mon Sep 17 00:00:00 2001 From: 4TT1L4 <2914096+4TT1L4@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:22:41 +0200 Subject: [PATCH 1/2] [BUG] STARTUP_DELAY is ignored #31 --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index e05f7f2..70d56b3 100644 --- a/app.py +++ b/app.py @@ -59,7 +59,10 @@ def worker(): with client as client: attempt_successful = False own_address : str = "" + logger.info(f" Connecting to backend at: {BACKEND_URL}...") + logger.info(f" > Wait {STARTUP_DELAY} seconds for backend start...") + time.sleep(STARTUP_DELAY) while not attempt_successful: try: response: Response[ErrorResponse | Settings] = get_settings.sync_detailed(client=client) From 13f7c25a93ac79dd8cbea64dab3915100c9dce17 Mon Sep 17 00:00:00 2001 From: 4TT1L4 <2914096+4TT1L4@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:23:12 +0200 Subject: [PATCH 2/2] [BUG] STARTUP_DELAY is ignored #31 --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 70d56b3..2b3fd8b 100644 --- a/app.py +++ b/app.py @@ -59,7 +59,7 @@ def worker(): with client as client: attempt_successful = False own_address : str = "" - + logger.info(f" Connecting to backend at: {BACKEND_URL}...") logger.info(f" > Wait {STARTUP_DELAY} seconds for backend start...") time.sleep(STARTUP_DELAY) @@ -88,12 +88,12 @@ def worker(): api_client = Api(client, own_address, CONFIRMATION_DELAY, logger) logger.info("==============================================") logger.info("[OK] Initialization is done ✅ ") - + logger.info(f"Loading strategy {STRATEGY}") strategy_class_ref = load_strategy(STRATEGY) strategy = strategy_class_ref(api_client, CONFIG, logger) logger.info(f" [OK] Strategy is loaded.") - + while True: logger.info("==============================================") logger.info(f" > Invoking strategy: {STRATEGY}... ⚙️⏳ ") @@ -111,7 +111,7 @@ def worker(): execution_time = end_time - start_time logger.info(f"End time: {datetime.fromtimestamp(start_time).strftime('%Y-%m-%d %H:%M:%S')}") logger.info(f"Execution time: {execution_time:.4f} seconds") - + logger.info(f"Wait {EXECUTION_DELAY}s until next execution...") time.sleep(EXECUTION_DELAY)