Commit 2d16f01
Refactor settings.py with BaseDBManager and improved architecture
- Extract BaseDBManager class with shared connect() and _execute_with_reconnect()
- Fix MySQL error 2013 (lost connection) handling in addition to 2006
- Refactor SoundboardDBManager to use _execute_with_reconnect pattern
- Replace global variables with Settings dataclass
- Split init() into _setup_logging(), _load_config(), _get_db_config(), _init_databases()
- Add type hints throughout
- Add module-level __getattr__ for backward compatibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent e882a29 commit 2d16f01
1 file changed
Lines changed: 311 additions & 322 deletions
0 commit comments