Tweaks to init code
This commit is contained in:
@@ -105,14 +105,19 @@ bugsnag.configure(
|
|||||||
)
|
)
|
||||||
handle_exceptions(app)
|
handle_exceptions(app)
|
||||||
|
|
||||||
# Storage backend (GCS)
|
# Google Cloud project
|
||||||
try:
|
try:
|
||||||
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = \
|
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = \
|
||||||
app.config['GOOGLE_APPLICATION_CREDENTIALS']
|
app.config['GCLOUD_APP_CREDENTIALS']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log.debug("The GOOGLE_APPLICATION_CREDENTIALS configuration value should "
|
raise SystemExit('GOOGLE_APPLICATION_CREDENTIALS configuration is missing')
|
||||||
"point to an existing and valid JSON file.")
|
|
||||||
raise
|
# Storage backend (GCS)
|
||||||
|
try:
|
||||||
|
os.environ['GCLOUD_PROJECT'] = \
|
||||||
|
app.config['GCLOUD_PROJECT']
|
||||||
|
except KeyError:
|
||||||
|
raise SystemExit('GCLOUD_PROJECT configuration value is missing')
|
||||||
|
|
||||||
|
|
||||||
# Algolia search
|
# Algolia search
|
||||||
|
Reference in New Issue
Block a user