chore: nettoyage .gitignore - retrait venv, __pycache__, .env, data, logs, modèles du tracking
This commit is contained in:
parent
7333a22bcd
commit
604a5affe0
9231 changed files with 1244 additions and 1601201 deletions
|
|
@ -5,7 +5,7 @@ import time
|
|||
import os
|
||||
import discord
|
||||
|
||||
logger = logging.getLogger('Superviseur')
|
||||
logger = logging.getLogger('Beta')
|
||||
|
||||
class TaskManager:
|
||||
"""Handles global background tasks, scheduled loops and reporting."""
|
||||
|
|
@ -29,10 +29,17 @@ class TaskManager:
|
|||
async def _voice_evaluation_loop(self):
|
||||
"""Periodic check for tactical voice connections."""
|
||||
await self.bot.wait_until_ready()
|
||||
auto_join = os.environ.get("AUTO_JOIN_VOICE", "true").lower() in ("true", "1", "yes")
|
||||
if not auto_join:
|
||||
logger.info("Auto-join vocal désactivé (AUTO_JOIN_VOICE=false)")
|
||||
return
|
||||
while not self.bot.is_closed():
|
||||
for guild in self.bot.guilds:
|
||||
await self.bot.voice_manager.evaluate_and_connect(guild)
|
||||
await asyncio.sleep(30) # Reduit à 30s pour plus de réactivité en tâche de fond
|
||||
try:
|
||||
await self.bot.voice_manager.evaluate_and_connect(guild)
|
||||
except Exception as e:
|
||||
logger.debug(f"Voice evaluation skipped: {e}")
|
||||
await asyncio.sleep(30)
|
||||
|
||||
async def _introspection_report_loop(self):
|
||||
"""Periodic broadcast of system health metrics."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue