mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-29 20:13:00 +00:00
Fix NBA manager warning cooldown to prevent repeated log messages
This commit is contained in:
@@ -856,7 +856,10 @@ class NBAUpcomingManager(BaseNBAManager):
|
|||||||
def display(self, force_clear=False):
|
def display(self, force_clear=False):
|
||||||
"""Display upcoming games."""
|
"""Display upcoming games."""
|
||||||
if not self.games_list:
|
if not self.games_list:
|
||||||
self.logger.info("[NBA] No upcoming games to display")
|
current_time = time.time()
|
||||||
|
if current_time - self.last_warning_time > self.warning_cooldown:
|
||||||
|
self.logger.info("[NBA] No upcoming games to display")
|
||||||
|
self.last_warning_time = current_time
|
||||||
return # Skip display update entirely
|
return # Skip display update entirely
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user