mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 05:13:01 +00:00
milb upcoming game debug logging
This commit is contained in:
@@ -15,6 +15,14 @@ from .cache_manager import CacheManager
|
||||
from requests.adapters import HTTPAdapter
|
||||
from urllib3.util.retry import Retry
|
||||
|
||||
# Import the API counter function from web interface
|
||||
try:
|
||||
from web_interface_v2 import increment_api_counter
|
||||
except ImportError:
|
||||
# Fallback if web interface is not available
|
||||
def increment_api_counter(kind: str, count: int = 1):
|
||||
pass
|
||||
|
||||
# Get logger without configuring
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -197,6 +205,9 @@ class StockManager:
|
||||
|
||||
data = response.json()
|
||||
|
||||
# Increment API counter for stock/crypto data call
|
||||
increment_api_counter('stocks', 1)
|
||||
|
||||
# Extract the relevant data from the response
|
||||
chart_data = data.get('chart', {}).get('result', [{}])[0]
|
||||
meta = chart_data.get('meta', {})
|
||||
|
||||
Reference in New Issue
Block a user