aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-01-15 22:47:38 -0800
committerBryan Newbold <bnewbold@archive.org>2020-01-15 22:49:34 -0800
commit527202e9b3da88336d7b6ae589423166285ddaf4 (patch)
treed13ff74cbca2a2cde167b7021681b2b918c97497 /python
parente83850ec7bd113e6cfb4af97df37934cb23ef265 (diff)
downloadsandcrawler-527202e9b3da88336d7b6ae589423166285ddaf4.tar.gz
sandcrawler-527202e9b3da88336d7b6ae589423166285ddaf4.zip
improve sentry reporting with 'release' git hash
Diffstat (limited to 'python')
-rwxr-xr-xpython/persist_tool.py1
-rwxr-xr-xpython/sandcrawler_worker.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/python/persist_tool.py b/python/persist_tool.py
index a91d4c3..7187719 100755
--- a/python/persist_tool.py
+++ b/python/persist_tool.py
@@ -11,7 +11,6 @@ import os
import sys
import argparse
import datetime
-import raven
from sandcrawler import *
from sandcrawler.persist import *
diff --git a/python/sandcrawler_worker.py b/python/sandcrawler_worker.py
index b164b8e..12b8bb9 100755
--- a/python/sandcrawler_worker.py
+++ b/python/sandcrawler_worker.py
@@ -15,7 +15,11 @@ import raven
from sandcrawler import *
# Yep, a global. Gets DSN from `SENTRY_DSN` environment variable
-sentry_client = raven.Client()
+try:
+ git_sha = raven.fetch_git_sha('..')
+except Exception as e:
+ git_sha = None
+sentry_client = raven.Client(release=git_sha)
def run_grobid_extract(args):