Skip to content

Commit

Permalink
FIX: Renamed Duplicate ENV Variables (#588)
Browse files Browse the repository at this point in the history
* Renamed duplicate env variables

* Removed TODO comment
  • Loading branch information
tahierhussain authored Aug 16, 2024
1 parent b6057e8 commit 830e563
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions unstract/connectors/src/unstract/connectors/gcs_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 830e563

Please sign in to comment.