Harden retention under one-click start: UME raw caps and collection TTL.

Keep inline schedulers as the start_netx.ps1 default while bounding UME raw_json and pruning old NE collection dirs on startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-02 18:16:30 +08:00
parent e0503df8a5
commit 96be90bd1a
11 changed files with 167 additions and 14 deletions

View file

@ -48,11 +48,11 @@ def log_runtime_budget(*, role: str = "api") -> None:
http_reserve,
)
host = str(getattr(settings, "host", "") or "").strip().lower()
if host not in {"127.0.0.1", "localhost", "::1"} and bool(
getattr(settings, "run_inline_schedulers", True)
):
_log.warning(
"Non-loopback bind (%s) with inline schedulers — for multi-user production prefer "
"NETX_RUN_INLINE_SCHEDULERS=false and `python -m netx_api.worker`.",
host,
inline = bool(getattr(settings, "run_inline_schedulers", True))
if inline:
_log.info(
"runtime budget: inline schedulers ON (one-click start via scripts/start_netx.ps1). "
"Optional split: NETX_RUN_INLINE_SCHEDULERS=false + python -m netx_api.worker"
)
elif host not in {"127.0.0.1", "localhost", "::1"}:
_log.info("runtime budget: external worker mode on bind=%s", host)