This commit is contained in:
nafer committed 2026-03-06 02:03:29 +03:00
1 parent de6b43aa25
commit b2e3ccea91
1 file changed
+6 -7
+6 -7
View File
@@ -207,15 +207,14 @@ async def run_browser_task(task_id: str, task: str, max_steps: int, model: str):
if i % 5 == 0:
print(f"[{task_id}] Waiting for CDP at {cdp_url}... (attempt {i})")
if not cdp_ready:
with open(f"/tmp/chrome_{task_id}.log", "r") as f:
print(f"[{task_id}] Chrome Logs:\n{f.read()}")
if task_id != "startup":
raise RuntimeError(f"Failed to start Chrome or CDP not ready after 30s at {cdp_url}")
if not cdp_ready:
with open(f"/tmp/chrome_{task_id}.log", "r") as f:
print(f"[{task_id}] Chrome Logs:\n{f.read()}")
if task_id != "startup":
raise RuntimeError(f"Failed to start Chrome or CDP not ready after 30s at {cdp_url}")
# Подключаемся через CDP
from browser_use import BrowserConfig
browser = Browser(config=BrowserConfig(cdp_url=cdp_url))
browser = Browser(cdp_url=cdp_url)
else:
# Обычный запуск
browser_profile = BrowserProfile(