Merge branch 'dev' into 'main'

V1.3 du système de gestions des rapports d'utilisateur

See merge request Omega_Kube/kuby!7
This commit is contained in:
Lucas Durand 2026-03-14 18:35:37 +01:00
commit a41a6f35fd
2 changed files with 13 additions and 6 deletions

8
bot.py
View file

@ -54,15 +54,17 @@ class MyBot(commands.Bot):
try:
flask_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "serveur_flask.py")
if os.path.exists(flask_path):
# On utilise DEVNULL car PM2 ou Nohup gèrent déjà les logs globaux
# et ça évite que le pipe se remplisse et bloque le serveur Flask
self.flask_process = subprocess.Popen(
[sys.executable, flask_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
cwd=os.path.dirname(flask_path)
)
kuby_logger.info(f"✅ Serveur Flask démarré (PID: {self.flask_process.pid})")
else:
kuby_logger.warning(f"⚠️ Fichier serveur_flask.py introuvable à {flask_path}")
kuby_logger.warning(f"⚠️ Fichier serveur_flask.py introuvable")
except Exception as e:
kuby_logger.error(f"❌ Impossible de démarrer le serveur Flask: {e}")