INNER CODE UNIT · Python

_current_app_server_port

TianGzlab/OmicsClaw · omicsclaw/surfaces/desktop/server.py:496

def _current_app_server_port() -> int:
    """Return the effective desktop-server port for this process."""
    raw = str(os.getenv("OMICSCLAW_APP_PORT", "") or "").strip()
    try:
        return int(raw or DEFAULT_APP_API_PORT)
    except (TypeError, ValueError):
        return DEFAULT_APP_API_PORT


def _oauth_port_conflict_message(ccproxy_port: int, app_port: int) -> str:
    return (
        f"ccproxy_port ({ccproxy_port}) conflicts with the OmicsClaw "
        f"desktop-server port ({app_port}). Pick a different port "
        f"(default: 11435) via the CCPROXY_PORT env var or the "
        f"ccproxy_port field in the request body."
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…