Problem: The submit method polled for a verdict for up to 120s, but verdicts are never displayed in cp.nvim by design. Solution: Remove the poll loop and `SUBMIT_POLL_TIMEOUT` constant. After a successful POST, immediately return `SubmitResult(success=True)`.
15 lines
435 B
Python
15 lines
435 B
Python
from collections import defaultdict
|
|
|
|
HTTP_TIMEOUT = 15.0
|
|
|
|
BROWSER_SESSION_TIMEOUT = 15000
|
|
BROWSER_NAV_TIMEOUT = 10000
|
|
BROWSER_SUBMIT_NAV_TIMEOUT: defaultdict[str, int] = defaultdict(
|
|
lambda: BROWSER_NAV_TIMEOUT
|
|
)
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["atcoder"] = BROWSER_NAV_TIMEOUT * 2
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["codeforces"] = BROWSER_NAV_TIMEOUT * 2
|
|
BROWSER_TURNSTILE_POLL = 5000
|
|
BROWSER_ELEMENT_WAIT = 10000
|
|
BROWSER_SETTLE_DELAY = 500
|
|
|