Skip to content

Commit

Permalink
Fix browser closing
Browse files Browse the repository at this point in the history
  • Loading branch information
satansdeer committed Jan 6, 2025
1 parent 4400dcb commit aabf751
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions skyvern/webeye/browser_factory.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import asyncio
import json
import os
import time
import uuid
Expand Down Expand Up @@ -190,9 +189,6 @@ def build_browser_args(proxy_location: ProxyLocation | None = None, **kwargs: di
if kwargs.get("cdp_port"):
args["args"].append(f"--remote-debugging-port={kwargs.get('cdp_port')}")

# pretty print args
print(json.dumps(args, indent=2))

if proxy_location:
if tz_info := get_tzinfo_from_proxy(proxy_location=proxy_location):
args["timezone_id"] = tz_info.key
Expand Down
2 changes: 1 addition & 1 deletion skyvern/webeye/persistent_sessions_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ async def close_session(self, organization_id: str, session_id: str) -> None:
organization_id=organization_id,
session_id=session_id,
)
await browser_session.browser_state.close()
self._browser_sessions.pop(session_id, None)
await browser_session.browser_state.close()
else:
LOG.info(
"Browser session not found in memory, marking as deleted in database",
Expand Down

0 comments on commit aabf751

Please sign in to comment.