From 0101be6f02ba9fc5a358b02d96a197d08f940bdb Mon Sep 17 00:00:00 2001 From: "Richard Kuo (Danswer)" Date: Mon, 21 Oct 2024 15:40:40 -0700 Subject: [PATCH] add more logging --- backend/danswer/connectors/web/connector.py | 2 +- backend/tests/integration/common_utils/managers/cc_pair.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/danswer/connectors/web/connector.py b/backend/danswer/connectors/web/connector.py index 9e0671ea248..9e406b71674 100644 --- a/backend/danswer/connectors/web/connector.py +++ b/backend/danswer/connectors/web/connector.py @@ -373,7 +373,7 @@ def load_from_state(self) -> GenerateDocumentsOutput: page.close() except Exception as e: last_error = f"Failed to fetch '{current_url}': {e}" - logger.error(last_error) + logger.exception(last_error) playwright.stop() restart_playwright = True continue diff --git a/backend/tests/integration/common_utils/managers/cc_pair.py b/backend/tests/integration/common_utils/managers/cc_pair.py index 99d8a82a2b3..94114298507 100644 --- a/backend/tests/integration/common_utils/managers/cc_pair.py +++ b/backend/tests/integration/common_utils/managers/cc_pair.py @@ -246,17 +246,17 @@ def wait_for_indexing( fetched_cc_pair.last_success and fetched_cc_pair.last_success > after ): - print(f"CC pair {cc_pair.id} indexing complete.") + print(f"Indexing complete: cc_pair={cc_pair.id}") return elapsed = time.monotonic() - start if elapsed > timeout: raise TimeoutError( - f"CC pair {cc_pair.id} indexing was not completed within {timeout} seconds" + f"Indexing wait timed out: cc_pair={cc_pair.id} timeout={timeout}s" ) print( - f"CC pair {cc_pair.id} indexing to complete. elapsed={elapsed:.2f} timeout={timeout}" + f"Indexing wait for completion: cc_pair={cc_pair.id} elapsed={elapsed:.2f} timeout={timeout}s" ) time.sleep(5)