0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-19 18:36:09 +02:00

Fiddling with the timeout for page.content() a little as unknown how long it really takes successfully

This commit is contained in:
Arne Tarara 2024-09-18 10:38:28 +02:00
parent 24357cca01
commit b9d1a782bd
No known key found for this signature in database
GPG key ID: 2540198A4079785B
4 changed files with 5 additions and 5 deletions

View file

@ -60,7 +60,7 @@ def run(playwright: Playwright, browser_name: str) -> None:
# set a timeout. Since the call to page.content() is blocking we need to defer it to the OS
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(5)
signal.alarm(20)
log_note(f"Page content was: {page.content()}")
signal.alarm(0) # remove timeout signal

View file

@ -59,7 +59,7 @@ def create_user(playwright: Playwright, browser_name: str, username: str, passwo
# set a timeout. Since the call to page.content() is blocking we need to defer it to the OS
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(5)
signal.alarm(20)
log_note(f"Page content was: {page.content()}")
signal.alarm(0) # remove timeout signal

View file

@ -14,7 +14,7 @@ def main(browser_name: str = "chromium"):
with sync_playwright() as playwright:
log_note(f"Launch browser {browser_name}")
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(5)
signal.alarm(10)
if browser_name == "firefox":
browser = playwright.firefox.launch(headless=True)
else:
@ -51,7 +51,7 @@ def main(browser_name: str = "chromium"):
# set a timeout. Since the call to page.content() is blocking we need to defer it to the OS
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(5)
signal.alarm(20)
log_note(f"Page content was: {page.content()}")
signal.alarm(0) # remove timeout signal

View file

@ -91,7 +91,7 @@ def create_conversation(playwright: Playwright, browser_name: str) -> str:
# set a timeout. Since the call to page.content() is blocking we need to defer it to the OS
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(5)
signal.alarm(20)
log_note(f"Page content was: {page.content()}")
signal.alarm(0) # remove timeout signal