update server

This commit is contained in:
2026-07-30 11:12:31 +08:00
commit 4312cb878c
99 changed files with 24034 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""ReinLoop server endpoint configuration shared by core modules."""
import os
from license_utils import get_verified_license
base_url = os.environ.get(
"REINLOOP_SERVER_URL",
"http://ReinLoop.dominatedconvergence.com",
).rstrip("/")
data_record_url = os.environ.get(
"REINLOOP_API_URL",
f"{base_url}/api",
)
_license = get_verified_license()
_license_device_id = (_license or {}).get("device_id", "").strip()
_environment_device_id = os.environ.get("REINLOOP_DEVICE_ID", "").strip()
if _license_device_id and _environment_device_id and _license_device_id != _environment_device_id:
raise RuntimeError("REINLOOP_DEVICE_ID 与许可证 device_id 不一致")
the_folder = _license_device_id or _environment_device_id or "local-test-device"
if not the_folder:
raise RuntimeError("设备 ID 不能为空")