From 9cff294a71e05e2d2d6dbfedb8758c8aaa7b9c66 Mon Sep 17 00:00:00 2001 From: Weves Date: Thu, 30 Nov 2023 02:56:59 -0800 Subject: [PATCH] Increase retries for google drive connector --- backend/danswer/connectors/google_drive/connector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/danswer/connectors/google_drive/connector.py b/backend/danswer/connectors/google_drive/connector.py index 31bb31ffc73..4a745a8b1e8 100644 --- a/backend/danswer/connectors/google_drive/connector.py +++ b/backend/danswer/connectors/google_drive/connector.py @@ -62,7 +62,10 @@ class GDriveMimeType(str, Enum): GoogleDriveFileType = dict[str, Any] -add_retries = retry_builder() +# Google Drive APIs are quite flakey and may 500 for an +# extended period of time. Trying to combat here by adding a very +# long retry period (~20 minutes of trying every minute) +add_retries = retry_builder(tries=50, max_delay=30) def _run_drive_file_query(