update panel
This commit is contained in:
+28
-25
@@ -1,26 +1,29 @@
|
||||
"""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:
|
||||
"""ReinLoop cloud-server endpoint configuration shared by core modules."""
|
||||
|
||||
import os
|
||||
|
||||
from license_utils import get_verified_license
|
||||
|
||||
|
||||
base_url = os.environ.get(
|
||||
"REINLOOP_SERVER_URL",
|
||||
"https://ReinLoop.dominatedconvergence.com",
|
||||
).rstrip("/")
|
||||
server_api_url = os.environ.get(
|
||||
"REINLOOP_API_URL",
|
||||
f"{base_url}/api",
|
||||
)
|
||||
# Compatibility alias used by existing modules. It points to the ReinLoop
|
||||
# Express server API, not a cloud-function endpoint.
|
||||
data_record_url = server_api_url
|
||||
_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 不能为空")
|
||||
Reference in New Issue
Block a user