From abb50d71b440d440f47fbaf4d3ab2b273ee52df8 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Mon, 26 May 2025 20:40:12 -0400 Subject: [PATCH] Feat: Update logging. Narrowing down where the issue is. Active cycle is being obtained, but nothing was happening with it. No more debug messages either. --- dakiny_bot/cogs/loops/daily_loop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dakiny_bot/cogs/loops/daily_loop.py b/dakiny_bot/cogs/loops/daily_loop.py index e743704..9aeaea9 100644 --- a/dakiny_bot/cogs/loops/daily_loop.py +++ b/dakiny_bot/cogs/loops/daily_loop.py @@ -44,10 +44,10 @@ class DailyLoop(commands.Cog, name="Daily Loop"): an active election, runs the check_date() function for the election to perform actions. Finally checks if the election is over to delete the current election object. """ - dakiny_logger.debug("Daily loop.") + dakiny_logger.debug("Daily loop. Current election: %s.", self.current_election) if self.current_election is None: self.current_election = self.get_election() - dakiny_logger.debug("Current election: %s", self.current_election) + dakiny_logger.debug("Current election: %s.", self.current_election) if self.current_election is not None: await self.current_election.check_date() @@ -81,9 +81,11 @@ class DailyLoop(commands.Cog, name="Daily Loop"): Election: Current election cycle, None if there is no election happening. """ cycle = get_active_election_cycle() + dakiny_logger.debug("Current cycle: %s.", cycle) # prevent exception from using cycle as an Int in an array if cycle is None: + dakiny_logger.info("Cycle was None. Returning without an election.") return None election = Election(cycle, self.bot.get_guild(settings.params.guild_id))