From 830e56382b5725590ccc1ea3f21fa644f62e070e Mon Sep 17 00:00:00 2001 From: Tahier Hussain <89440263+tahierhussain@users.noreply.github.com> Date: Sat, 17 Aug 2024 01:51:17 +0530 Subject: [PATCH] FIX: Renamed Duplicate ENV Variables (#588) * Renamed duplicate env variables * Removed TODO comment --- backend/sample.env | 4 ++-- unstract/connectors/src/unstract/connectors/gcs_helper.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/sample.env b/backend/sample.env index fd45516ae..93e5fc938 100644 --- a/backend/sample.env +++ b/backend/sample.env @@ -57,8 +57,8 @@ FREE_STORAGE_AWS_ACCESS_KEY_ID= FREE_STORAGE_AWS_SECRET_ACCESS_KEY= UNSTRACT_FREE_STORAGE_BUCKET_NAME= -GOOGLE_SERVICE_ACCOUNT= -GOOGLE_PROJECT_ID= +GDRIVE_GOOGLE_SERVICE_ACCOUNT= +GDRIVE_GOOGLE_PROJECT_ID= GOOGLE_STORAGE_ACCESS_KEY_ID= GOOGLE_STORAGE_SECRET_ACCESS_KEY= GOOGLE_STORAGE_BASE_URL=https://storage.googleapis.com diff --git a/unstract/connectors/src/unstract/connectors/gcs_helper.py b/unstract/connectors/src/unstract/connectors/gcs_helper.py index 2e606adb2..c4d110d4d 100644 --- a/unstract/connectors/src/unstract/connectors/gcs_helper.py +++ b/unstract/connectors/src/unstract/connectors/gcs_helper.py @@ -20,15 +20,15 @@ def __init__(self, message: str): class GCSHelper: def __init__(self) -> None: - self.google_service_json = os.environ.get("GOOGLE_SERVICE_ACCOUNT") - self.google_project_id = os.environ.get("GOOGLE_PROJECT_ID") + self.google_service_json = os.environ.get("GDRIVE_GOOGLE_SERVICE_ACCOUNT") + self.google_project_id = os.environ.get("GDRIVE_GOOGLE_PROJECT_ID") if self.google_service_json is None: raise GCSHelperEnvNotSetException( - "GOOGLE_SERVICE_ACCOUNT environment variable not set" + "GDRIVE_GOOGLE_SERVICE_ACCOUNT environment variable not set" ) if self.google_project_id is None: raise GCSHelperEnvNotSetException( - "GOOGLE_PROJECT_ID environment variable not set" + "GDRIVE_GOOGLE_PROJECT_ID environment variable not set" ) self.google_credentials = service_account.Credentials.from_service_account_info(