inner-search
All checks were successful
Deploy to core / deploy (push) Successful in 1m39s

This commit is contained in:
2024-01-29 03:27:30 +03:00
parent 35f7a35f27
commit 2c2932caeb
6 changed files with 166 additions and 57 deletions

View File

@@ -49,7 +49,7 @@ class ViewedStorage:
self = ViewedStorage
async with self.lock:
os.environ.setdefault('GOOGLE_APPLICATION_CREDENTIALS', GOOGLE_KEYFILE_PATH)
if GOOGLE_KEYFILE_PATH:
if GOOGLE_KEYFILE_PATH and os.path.isfile(GOOGLE_KEYFILE_PATH):
# Using a default constructor instructs the client to use the credentials
# specified in GOOGLE_APPLICATION_CREDENTIALS environment variable.
self.analytics_client = BetaAnalyticsDataClient()