diff --git a/src/background_data_service.py b/src/background_data_service.py index 32ef6444..948b7f59 100644 --- a/src/background_data_service.py +++ b/src/background_data_service.py @@ -570,17 +570,7 @@ class BackgroundDataService: for request_id in list(self.active_requests.keys()): self.cancel_request(request_id) - # Shutdown executor with compatibility for older Python versions - try: - # Try with timeout parameter (Python 3.9+) - self.executor.shutdown(wait=wait, timeout=timeout) - except TypeError: - # Fallback for older Python versions that don't support timeout - if wait and timeout: - # For older versions, we can't specify timeout, so just wait - self.executor.shutdown(wait=True) - else: - self.executor.shutdown(wait=wait) + self.executor.shutdown(wait=wait) logger.info("BackgroundDataService shutdown complete") diff --git a/src/base_classes/sports.py b/src/base_classes/sports.py index 74e11fb7..5dbd8860 100644 --- a/src/base_classes/sports.py +++ b/src/base_classes/sports.py @@ -416,7 +416,6 @@ class SportsCore(ABC): league=self.league, event_id=game['id'], update_interval_seconds=update_interval, - is_live=is_live ) if odds_data: diff --git a/src/plugin_system/plugin_executor.py b/src/plugin_system/plugin_executor.py index aba5fd5c..e4c1b946 100644 --- a/src/plugin_system/plugin_executor.py +++ b/src/plugin_system/plugin_executor.py @@ -16,7 +16,7 @@ from src.logging_config import get_logger from src.error_aggregator import record_error -class TimeoutError(Exception): +class PluginTimeoutError(Exception): """Raised when a plugin operation times out.""" pass @@ -57,7 +57,7 @@ class PluginExecutor: Result of operation Raises: - TimeoutError: If operation times out + PluginTimeoutError: If operation times out PluginError: If operation raises an exception """ timeout = timeout or self.default_timeout @@ -81,7 +81,7 @@ class PluginExecutor: if not result_container['completed']: error_msg = f"{plugin_context} operation timed out after {timeout}s" self.logger.error(error_msg) - timeout_error = TimeoutError(error_msg) + timeout_error = PluginTimeoutError(error_msg) record_error(timeout_error, plugin_id=plugin_id, operation="timeout") raise timeout_error @@ -128,7 +128,7 @@ class PluginExecutor: ) return True - except TimeoutError: + except PluginTimeoutError: self.logger.error("Plugin %s update() timed out", plugin_id) return False except PluginError: @@ -204,7 +204,7 @@ class PluginExecutor: # For backward compatibility: if plugin returns None or something else, treat as success self.logger.debug(f"Plugin {plugin_id} display() returned non-boolean: {result}, treating as True") return True - except TimeoutError: + except PluginTimeoutError: self.logger.error("Plugin %s display() timed out", plugin_id) return False except PluginError: @@ -247,7 +247,7 @@ class PluginExecutor: timeout=timeout, plugin_id=plugin_id ) - except (TimeoutError, PluginError, Exception) as e: + except (PluginTimeoutError, PluginError, Exception) as e: self.logger.warning( "Plugin %s %s failed, using default return: %s", plugin_id,