fix(bridge): 채널 중복 생성 race condition 수정 + AG- 접두사 + metadata 모니터링

This commit is contained in:
2026-03-07 10:58:10 +09:00
parent ba8454c2e1
commit 02c757f703
4 changed files with 123 additions and 58 deletions

View File

@@ -4,21 +4,22 @@ Entry point that runs the brain watcher and Discord bot together.
"""
import asyncio
import io
import logging
import signal
import sys
from config import Config
from watcher import BrainWatcher
from bot import GravityBot
# Logging setup
# Logging setup (UTF-8 forced for Windows cp949 compatibility)
_utf8_stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(name)s] %(levelname)s: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
handlers=[
logging.StreamHandler(sys.stdout),
logging.StreamHandler(_utf8_stdout),
logging.FileHandler("gravity_control.log", encoding="utf-8"),
],
)