new strategies

This commit is contained in:
2025-10-25 21:51:25 +02:00
parent 76a858a7df
commit 541a71d2a6
6 changed files with 291 additions and 52 deletions

View File

@ -74,13 +74,13 @@ def start_live_feed(shared_prices_dict, log_level='off'):
# --- Watchdog Logic ---
time.sleep(15) # Check the connection every 15 seconds
if info is None or not info.ws_manager.is_running():
# --- FIX: Log this critical failure to the persistent error log ---
# --- FIX: Changed 'is_running()' to the correct method 'is_alive()' ---
if info is None or not info.ws_manager.is_alive():
error_msg = "WebSocket connection lost or not running. Attempting to reconnect..."
logging.warning(error_msg)
log_error(error_msg, include_traceback=False) # Log it to the file
if info:
if info and info.ws_manager: # Check if ws_manager exists before stopping
try:
info.ws_manager.stop() # Clean up old manager
except Exception as e: