feat: 后端支持托管到 Metrix,启动自动安装并接入平台登录

This commit is contained in:
2026-11-03 12:26:20 +08:00
parent 6b0ea1ed4a
commit c38e649904
12 changed files with 724 additions and 45 deletions
+13
View File
@@ -0,0 +1,13 @@
from __future__ import annotations
import os
import tempfile
from pathlib import Path
for _name in list(os.environ):
if _name.startswith("METRIX_") or _name.startswith("DECOM_DB_") or _name == "DECOM_INLINE_WORKER":
os.environ.pop(_name)
TEST_ROOT = Path(os.environ.get("DECOM_TEST_DATA_DIR") or Path(tempfile.gettempdir()) / "decomeval-pytest")
os.environ["DECOM_DATA_DIR"] = str(TEST_ROOT / "data")
os.environ["DECOM_ALLOW_SQLITE"] = "1"