1
This commit is contained in:
1 parent
cdba9a29f3
commit
c1c0dfca9e
2 files changed
+15
-6
No files matched your search
@@ -36,6 +36,15 @@ class TaskResponse(BaseModel):
|
||||
# Хранилище задач
|
||||
tasks = {}
|
||||
|
||||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
import sys
|
||||
import pkg_resources
|
||||
print(f"Python version: {sys.version}")
|
||||
print("Installed packages:")
|
||||
for dist in pkg_resources.working_set:
|
||||
print(f" {dist.project_name}=={dist.version}")
|
||||
|
||||
@app.post("/api/tasks", response_model=TaskResponse)
|
||||
async def create_task(request: TaskRequest):
|
||||
"""Создать новую задачу браузера"""
|
||||
@@ -133,16 +142,16 @@ async def run_browser_task(task_id: str, task: str, max_steps: int, model: str):
|
||||
chrome_cmd = [
|
||||
chrome_exe,
|
||||
f"--remote-debugging-port={REMOTE_DEBUGGING_PORT}",
|
||||
f"--remote-debugging-address=0.0.0.0",
|
||||
"--remote-debugging-address=0.0.0.0",
|
||||
f"--user-data-dir={user_data_dir}",
|
||||
"--remote-allow-origins=*",
|
||||
"--headless=new",
|
||||
"--no-sandbox",
|
||||
"--disable-dev-shm-usage",
|
||||
"--disable-gpu",
|
||||
"--no-first-run",
|
||||
"--no-default-browser-check",
|
||||
"--disable-extensions",
|
||||
"--disable-gpu",
|
||||
"--no-sandbox",
|
||||
"--disable-dev-shm-usage",
|
||||
"--headless",
|
||||
"about:blank"
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user