Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Chore: remove unused class-level variables in DatasourceManager (#27011)

Yongtao Huang312974aa20f2
diff --git a/api/core/datasource/datasource_manager.py b/api/core/datasource/datasource_manager.py
index 47d297e1945..002415a7dbb 100644
--- a/api/core/datasource/datasource_manager.py
+++ b/api/core/datasource/datasource_manager.py
@@ -1,11 +1,9 @@
import logging
from threading import Lock
-from typing import Union
import contexts
from core.datasource.__base.datasource_plugin import DatasourcePlugin
from core.datasource.__base.datasource_provider import DatasourcePluginProviderController
-from core.datasource.entities.common_entities import I18nObject
from core.datasource.entities.datasource_entities import DatasourceProviderType
from core.datasource.errors import DatasourceProviderNotFoundError
from core.datasource.local_file.local_file_provider import LocalFileDatasourcePluginProviderController
@@ -18,11 +16,6 @@ logger = logging.getLogger(__name__)
class DatasourceManager:
- _builtin_provider_lock = Lock()
- _hardcoded_providers: dict[str, DatasourcePluginProviderController] = {}
- _builtin_providers_loaded = False
- _builtin_tools_labels: dict[str, Union[I18nObject, None]] = {}
-
@classmethod
def get_datasource_plugin_provider(
cls, provider_id: str, tenant_id: str, datasource_type: DatasourceProviderType