feat: Enhance stream processing and SocketIO services with app context management

This commit is contained in:
JSC
2025-07-07 21:17:51 +02:00
parent e7d958eb39
commit 9ac55f8904
4 changed files with 32 additions and 55 deletions

View File

@@ -6,17 +6,13 @@ from app import create_app, socketio
# Load environment variables from .env file
load_dotenv()
# Configure logging to show all INFO and DEBUG messages
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%H:%M:%S'
)
# Set specific loggers to DEBUG for detailed SocketIO and music player logs
logging.getLogger('app.services.socketio_service').setLevel(logging.DEBUG)
logging.getLogger('app.services.music_player_service').setLevel(logging.INFO)
def main() -> None:
"""Run the Flask application with SocketIO."""