refactor(config): retire RuntimeSettingsCompat host usage

This commit is contained in:
jxxghp
2026-08-26 15:55:21 +08:00
parent cdab54254d
commit 9dbe424c3d
162 changed files with 1966 additions and 1745 deletions
+2 -4
View File
@@ -2,11 +2,9 @@ from typing import Tuple, Union
from app.application.database import get_database_governance
from app.modules import _ModuleBase
from app.runtime.settings import RuntimeSettingsCompat
from app.runtime.settings import get_runtime_setting
from app.schemas.types import ModuleType, OtherModulesType
settings = RuntimeSettingsCompat()
class PostgreSQLModule(_ModuleBase):
"""
@@ -55,7 +53,7 @@ class PostgreSQLModule(_ModuleBase):
"""
测试模块连接性
"""
if settings.DB_TYPE != "postgresql":
if get_runtime_setting('DB_TYPE') != "postgresql":
return None
error = get_database_governance().test()
if error: