refactor(timeouts): extract BROWSER_SUBMIT_NAV_TIMEOUT

This commit is contained in:
Barrett Ruth 2026-03-05 11:27:47 -05:00
parent c963728fe9
commit 789cb3205b
2 changed files with 3 additions and 1 deletions

View file

@ -21,6 +21,7 @@ from .models import (
from .timeouts import (
BROWSER_NAV_TIMEOUT,
BROWSER_SESSION_TIMEOUT,
BROWSER_SUBMIT_NAV_TIMEOUT,
HTTP_TIMEOUT,
)
@ -396,7 +397,7 @@ def _submit_headless(
try:
page.wait_for_url(
lambda url: "/my" in url or "/status" in url,
timeout=BROWSER_NAV_TIMEOUT * 2,
timeout=BROWSER_SUBMIT_NAV_TIMEOUT,
)
except Exception:
err_el = page.query_selector("span.error")

View file

@ -2,6 +2,7 @@ HTTP_TIMEOUT = 15.0
BROWSER_SESSION_TIMEOUT = 15000
BROWSER_NAV_TIMEOUT = 10000
BROWSER_SUBMIT_NAV_TIMEOUT = BROWSER_NAV_TIMEOUT * 2
BROWSER_TURNSTILE_POLL = 5000
BROWSER_ELEMENT_WAIT = 10000
BROWSER_SETTLE_DELAY = 500