mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: switching out ConnectorRegistry references for DatasourceDAO (#20380)
* rename and move dao file * Update dao.py * add cachekey * Update __init__.py * change reference in query context test * add utils ref * more ref changes * add helpers * add todo in dashboard.py * add cachekey * circular import error in dar.py * push rest of refs * fix linting * fix more linting * update enum * remove references for connector registry * big reafctor * take value * fix * test to see if removing value works * delete connectregistry * address concerns * address comments * fix merge conflicts * address concern II * address concern II * fix test Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
This commit is contained in:
@@ -28,7 +28,6 @@ from flask_babel import gettext as __, lazy_gettext as _
|
||||
from flask_compress import Compress
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
from superset.connectors.connector_registry import ConnectorRegistry
|
||||
from superset.constants import CHANGE_ME_SECRET_KEY
|
||||
from superset.extensions import (
|
||||
_event_logger,
|
||||
@@ -473,7 +472,11 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
||||
# Registering sources
|
||||
module_datasource_map = self.config["DEFAULT_MODULE_DS_MAP"]
|
||||
module_datasource_map.update(self.config["ADDITIONAL_MODULE_DS_MAP"])
|
||||
ConnectorRegistry.register_sources(module_datasource_map)
|
||||
|
||||
# todo(hughhhh): fully remove the datasource config register
|
||||
for module_name, class_names in module_datasource_map.items():
|
||||
class_names = [str(s) for s in class_names]
|
||||
__import__(module_name, fromlist=class_names)
|
||||
|
||||
def configure_cache(self) -> None:
|
||||
cache_manager.init_app(self.superset_app)
|
||||
|
||||
Reference in New Issue
Block a user