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:
parent
24357cca01
commit
b9d1a782bd
4 changed files with 5 additions and 5 deletions
|
@ -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
|
# 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.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(5)
|
signal.alarm(20)
|
||||||
log_note(f"Page content was: {page.content()}")
|
log_note(f"Page content was: {page.content()}")
|
||||||
signal.alarm(0) # remove timeout signal
|
signal.alarm(0) # remove timeout signal
|
||||||
|
|
||||||
|
|
|
@ -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
|
# 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.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(5)
|
signal.alarm(20)
|
||||||
log_note(f"Page content was: {page.content()}")
|
log_note(f"Page content was: {page.content()}")
|
||||||
signal.alarm(0) # remove timeout signal
|
signal.alarm(0) # remove timeout signal
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ def main(browser_name: str = "chromium"):
|
||||||
with sync_playwright() as playwright:
|
with sync_playwright() as playwright:
|
||||||
log_note(f"Launch browser {browser_name}")
|
log_note(f"Launch browser {browser_name}")
|
||||||
signal.signal(signal.SIGALRM, timeout_handler)
|
signal.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(5)
|
signal.alarm(10)
|
||||||
if browser_name == "firefox":
|
if browser_name == "firefox":
|
||||||
browser = playwright.firefox.launch(headless=True)
|
browser = playwright.firefox.launch(headless=True)
|
||||||
else:
|
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
|
# 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.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(5)
|
signal.alarm(20)
|
||||||
log_note(f"Page content was: {page.content()}")
|
log_note(f"Page content was: {page.content()}")
|
||||||
signal.alarm(0) # remove timeout signal
|
signal.alarm(0) # remove timeout signal
|
||||||
|
|
||||||
|
|
|
@ -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
|
# 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.signal(signal.SIGALRM, timeout_handler)
|
||||||
signal.alarm(5)
|
signal.alarm(20)
|
||||||
log_note(f"Page content was: {page.content()}")
|
log_note(f"Page content was: {page.content()}")
|
||||||
signal.alarm(0) # remove timeout signal
|
signal.alarm(0) # remove timeout signal
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue