browser address schema update (#2931)

This commit is contained in:
Shuchang Zheng
2025-07-10 23:50:27 -07:00
committed by GitHub
parent 1f795a7d95
commit 13c27c5178
3 changed files with 4 additions and 30 deletions

View File

@@ -16,8 +16,6 @@ LOG = structlog.get_logger()
@dataclass
class BrowserSession:
browser_state: BrowserState
cdp_port: int
cdp_host: str = "localhost"
class PersistentSessionsManager:
@@ -139,16 +137,6 @@ class PersistentSessionsManager:
organization_id=organization_id,
)
async def get_network_info(self, session_id: str) -> tuple[int | None, str | None]:
"""Returns cdp port and ip address of the browser session"""
browser_session = self._browser_sessions.get(session_id)
if browser_session:
return (
browser_session.cdp_port,
browser_session.cdp_host,
)
return None, None
async def release_browser_session(self, session_id: str, organization_id: str) -> None:
"""Release a specific browser session."""
await self.database.release_persistent_browser_session(session_id, organization_id)