aminghadersohi commented on code in PR #35163:
URL: https://github.com/apache/superset/pull/35163#discussion_r2370076836


##########
superset/mcp_service/flask_singleton.py:
##########
@@ -0,0 +1,46 @@
+"""
+Simple module-level Flask app instance for MCP service.
+
+Following the Stack Overflow recommendation:
+"a simple module with just the instance is enough"
+- The module itself acts as the singleton
+- No need for complex patterns or metaclasses
+- Clean and Pythonic approach
+"""
+
+import logging
+
+from flask import Flask
+
+logger = logging.getLogger(__name__)
+
+logger.info("Creating Flask app instance for MCP service")
+
+try:
+    from superset.app import create_app
+    from superset.mcp_service.mcp_config import get_mcp_config
+
+    # Create the Flask app instance - this is the singleton
+    app = create_app()

Review Comment:
   is there a big one i am totally mising/ignoring?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to