Reduce API startup storage prewarm
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 19:21:27 +03:00
parent d738f3fc39
commit c27998693e
2 changed files with 7 additions and 4 deletions
+3 -3
View File
@@ -585,7 +585,7 @@ def _load_persisted_state() -> None:
_rbac.users[access.user_id] = access
for payload in _storage.list_documents("privacy_markers"):
_privacy.upsert_marker(PrivacyMarker.model_validate(payload))
version_load_limit = int(os.environ.get("SFERA_STARTUP_OBJECT_VERSION_LIMIT", "5000"))
version_load_limit = int(os.environ.get("SFERA_STARTUP_OBJECT_VERSION_LIMIT", "0"))
for payload in _storage.list_documents("object_versions", limit=version_load_limit):
_versions.upsert_version(SemanticObjectVersion.model_validate(payload))
@@ -2338,10 +2338,10 @@ async def download_windows_agent_cmd_installer(request: Request, agent_id: str |
if agent_id:
installer_url = f"{installer_url}?agent_id={quote(agent_id, safe='')}"
escaped_installer_url = installer_url.replace("%", "%%")
script = f"""@echo off
script = fr"""@echo off
setlocal
set "INSTALLER_URL={escaped_installer_url}"
set "INSTALLER=%TEMP%\\install-sfera-windows-agent.ps1"
set "INSTALLER=%TEMP%\install-sfera-windows-agent.ps1"
echo Downloading SFERA Windows Agent installer...
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing -Uri $env:INSTALLER_URL -OutFile $env:INSTALLER"
if errorlevel 1 (