aboutsummaryrefslogtreecommitdiffstats
path: root/python/web_config.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-21 13:33:35 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-21 13:41:15 -0800
commit90514012f90afa7de80bd6d5ee18f68a9b9e89c8 (patch)
treed4edb1fa5d9ed9eaa4d30c31b6c63bb4aea65c77 /python/web_config.py
parent0ebace294f697326fcfd9686bd956f256b166b04 (diff)
downloadfatcat-90514012f90afa7de80bd6d5ee18f68a9b9e89c8.tar.gz
fatcat-90514012f90afa7de80bd6d5ee18f68a9b9e89c8.zip
enable sentry exceptions for fatcat-web
Diffstat (limited to 'python/web_config.py')
-rw-r--r--python/web_config.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/python/web_config.py b/python/web_config.py
index 8e177f77..8449aff5 100644
--- a/python/web_config.py
+++ b/python/web_config.py
@@ -10,6 +10,7 @@ import scripts.
"""
import os
+import raven
import subprocess
basedir = os.path.abspath(os.path.dirname(__file__))
@@ -22,6 +23,17 @@ class Config(object):
ELASTICSEARCH_BACKEND = os.environ.get("ELASTICSEARCH_BACKEND", default="http://localhost:9200")
ELASTICSEARCH_INDEX = os.environ.get("ELASTICSEARCH_INDEX", default="fatcat")
+ try:
+ git_release = raven.fetch_git_sha(os.path.dirname(os.pardir))
+ except Exception as e:
+ print("WARNING: couldn't set sentry git release automatically: " + str(e))
+ git_release = None
+ SENTRY_CONFIG = {
+ #'include_paths': ['fatcat_web', 'fatcat_client', 'fatcat_tools'],
+ 'release': git_release,
+ 'fatcat_domain': FATCAT_DOMAIN,
+ }
+
# "Event more verbose" debug options. SECRET_KEY is bogus.
#SQLALCHEMY_ECHO = True
#SECRET_KEY = "kuhy0284hflskjhg01284"