From eb6851de3c0dc8a904b7e693ff290b84e35d8f11 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:24:28 -0500 Subject: [PATCH] reduce logging noise --- src/mlb_manager.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mlb_manager.py b/src/mlb_manager.py index d9169bb0..c6d28973 100644 --- a/src/mlb_manager.py +++ b/src/mlb_manager.py @@ -977,9 +977,9 @@ class MLBRecentManager(BaseMLBManager): def update(self): """Update recent games data.""" current_time = time.time() - self.logger.info("Checking for recent MLB games...") - if current_time - self.last_update < self.update_interval: - self.logger.info("Skipping recent games update, interval not reached.") + self.logger.info(f"Checking for recent MLB games. Last update was at {self.last_update}") + if self.last_update != 0 and (current_time - self.last_update < self.update_interval): + self.logger.info(f"Skipping recent games update, interval not reached. Next update in {self.update_interval - (current_time - self.last_update):.0f} seconds.") return try: @@ -1090,9 +1090,9 @@ class MLBUpcomingManager(BaseMLBManager): def update(self): """Update upcoming games data.""" current_time = time.time() - self.logger.info("Checking for upcoming MLB games...") - if current_time - self.last_update < self.update_interval: - self.logger.info("Skipping upcoming games update, interval not reached.") + self.logger.info(f"Checking for upcoming MLB games. Last update was at {self.last_update}") + if self.last_update != 0 and (current_time - self.last_update < self.update_interval): + self.logger.info(f"Skipping upcoming games update, interval not reached. Next update in {self.update_interval - (current_time - self.last_update):.0f} seconds.") return try: