fix: only log registration count when it changes (stop 3s spam)
This commit is contained in:
8
bot.py
8
bot.py
@@ -168,8 +168,12 @@ class GravityBot(commands.Bot):
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
|
||||
if count:
|
||||
logger.info(f"Loaded {count} conversation→project registrations")
|
||||
# Only log when count changes
|
||||
prev = getattr(self, '_last_reg_count', -1)
|
||||
if count != prev:
|
||||
self._last_reg_count = count
|
||||
if count:
|
||||
logger.info(f"Loaded {count} conversation→project registrations")
|
||||
|
||||
# ─── Channel Management ──────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user