mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-13 14:43:05 +02:00
Stop trying a million times for the user validity check
This commit is contained in:
@ -316,7 +316,9 @@ class GoogleDriveConnector(
|
|||||||
# validate that the user has access to the drive APIs by performing a simple
|
# validate that the user has access to the drive APIs by performing a simple
|
||||||
# request and checking for a 401
|
# request and checking for a 401
|
||||||
try:
|
try:
|
||||||
retry_builder()(get_root_folder_id)(drive_service)
|
# default is ~17mins of retries, don't do that here for cases so we don't
|
||||||
|
# waste 17mins everytime we run into a user without access to drive APIs
|
||||||
|
retry_builder(tries=3, delay=1)(get_root_folder_id)(drive_service)
|
||||||
except HttpError as e:
|
except HttpError as e:
|
||||||
if e.status_code == 401:
|
if e.status_code == 401:
|
||||||
# fail gracefully, let the other impersonations continue
|
# fail gracefully, let the other impersonations continue
|
||||||
|
Reference in New Issue
Block a user