mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
fix ncaa baseball log spam
This commit is contained in:
@@ -643,10 +643,13 @@ class NCAABaseballRecentManager(BaseNCAABaseballManager):
|
||||
current_time = time.time()
|
||||
if current_time - self.last_update < self.update_interval:
|
||||
return
|
||||
self.last_update = current_time
|
||||
try:
|
||||
games = self._fetch_ncaa_baseball_api_data()
|
||||
if not games:
|
||||
logger.warning("[NCAABaseball] No games returned from API")
|
||||
self.recent_games = []
|
||||
self.current_game = None
|
||||
return
|
||||
|
||||
new_recent_games = []
|
||||
@@ -688,7 +691,6 @@ class NCAABaseballRecentManager(BaseNCAABaseballManager):
|
||||
self.recent_games = []
|
||||
self.current_game = None
|
||||
|
||||
self.last_update = current_time
|
||||
except Exception as e:
|
||||
logger.error(f"[NCAABaseball] Error updating recent games: {e}", exc_info=True)
|
||||
|
||||
@@ -740,6 +742,7 @@ class NCAABaseballUpcomingManager(BaseNCAABaseballManager):
|
||||
current_time = time.time()
|
||||
if current_time - self.last_update < self.update_interval:
|
||||
return
|
||||
self.last_update = current_time
|
||||
try:
|
||||
games = self._fetch_ncaa_baseball_api_data()
|
||||
if games:
|
||||
@@ -780,7 +783,6 @@ class NCAABaseballUpcomingManager(BaseNCAABaseballManager):
|
||||
self.upcoming_games = []
|
||||
self.current_game = None
|
||||
|
||||
self.last_update = current_time
|
||||
except Exception as e:
|
||||
logger.error(f"[NCAABaseball] Error updating upcoming games: {e}", exc_info=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user