perf(kb):知识库数据清洗同步改异步优化;chat中查假期请假agent入口优化
This commit is contained in:
1 parent
61ebb46c0f
commit
c3b63df2f5
11 files changed
+839
-171
No files matched your search
@@ -34,6 +34,9 @@ _BACKEND_DIR = Path(__file__).resolve().parents[1]
|
||||
_ROOT_DIR = _BACKEND_DIR.parent
|
||||
ROOT_ENV_LOCAL_PATH = _ROOT_DIR / '.env.local'
|
||||
LEGACY_BACKEND_ENV_PATH = _BACKEND_DIR / '.env'
|
||||
# Backward-compatible alias for tests and older callers that still patch/read
|
||||
# the historical backend/.env location directly.
|
||||
BACKEND_ENV_PATH = LEGACY_BACKEND_ENV_PATH
|
||||
WECOM_BOOL_KEYS = {
|
||||
'WECOM_ENABLED',
|
||||
'WECOM_AUTO_CREATE_USER',
|
||||
@@ -180,7 +183,7 @@ def _persist_to_env_file(values: dict[str, str]) -> bool:
|
||||
|
||||
def _load_from_env_file(prefixes: tuple[str, ...]) -> dict[str, str]:
|
||||
merged: dict[str, str] = {}
|
||||
for env_path in (LEGACY_BACKEND_ENV_PATH, ROOT_ENV_LOCAL_PATH):
|
||||
for env_path in (BACKEND_ENV_PATH, ROOT_ENV_LOCAL_PATH):
|
||||
if not env_path.exists():
|
||||
continue
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user