mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-08-28 05:15:00 +00:00
Add dedicated evolution MCP idle timeout
This commit is contained in:
parent
31beac86a5
commit
a78ac41a1c
1 changed files with 8 additions and 2 deletions
|
|
@ -162,12 +162,18 @@ def _maybe_start_idle_watchdog() -> None:
|
|||
if _idle_watchdog_started:
|
||||
return
|
||||
|
||||
timeout_raw = os.environ.get("OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS", "").strip()
|
||||
timeout_raw = os.environ.get("OPENSPACE_EVOLUTION_MCP_IDLE_TIMEOUT_SECONDS", "").strip()
|
||||
if not timeout_raw:
|
||||
timeout_raw = os.environ.get("OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS", "").strip()
|
||||
if timeout_raw:
|
||||
try:
|
||||
idle_timeout_seconds = int(timeout_raw)
|
||||
except ValueError:
|
||||
logger.warning("Invalid OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS=%r", timeout_raw)
|
||||
logger.warning(
|
||||
"Invalid evolution MCP idle timeout value=%r "
|
||||
"(from OPENSPACE_EVOLUTION_MCP_IDLE_TIMEOUT_SECONDS or OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS)",
|
||||
timeout_raw,
|
||||
)
|
||||
return
|
||||
else:
|
||||
idle_timeout_seconds = 900
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue