Skip to content

Commit

Permalink
[BUG] STARTUP_DELAY is ignored #31
Browse files Browse the repository at this point in the history
  • Loading branch information
4TT1L4 committed Apr 20, 2024
1 parent 23dcbb9 commit bc04b05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}... ⚙️⏳ ")
Expand All @@ -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)

Expand Down

0 comments on commit bc04b05

Please sign in to comment.