mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
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:
parent
e0503df8a5
commit
96be90bd1a
11 changed files with 167 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue