summaryrefslogtreecommitdiffstats
path: root/python/fatcat_cleanup.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-01-10 12:40:46 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-01-10 12:41:54 -0800
commit9cdf476863dd686fa928dfb8a99825a9fd6776fe (patch)
tree61616aa4cdc52f1adf1ebe48b66df268f2177553 /python/fatcat_cleanup.py
parentb3076c623703e6f46155767633e0b428b46da4a1 (diff)
downloadfatcat-9cdf476863dd686fa928dfb8a99825a9fd6776fe.tar.gz
fatcat-9cdf476863dd686fa928dfb8a99825a9fd6776fe.zip
add missing sentry/raven tags
Good to have exceptions tracked and stored even for commands run from the command line. But in particular the importer runs as a kafka worker and should be tracking excpetions.
Diffstat (limited to 'python/fatcat_cleanup.py')
-rwxr-xr-xpython/fatcat_cleanup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/fatcat_cleanup.py b/python/fatcat_cleanup.py
index a7c80965..d8b2aea2 100755
--- a/python/fatcat_cleanup.py
+++ b/python/fatcat_cleanup.py
@@ -1,11 +1,17 @@
#!/usr/bin/env python3
import os, sys, argparse
+import raven
+
from fatcat_tools import authenticated_api
from fatcat_tools.importers import JsonLinePusher
from fatcat_tools.cleanups import *
+# Yep, a global. Gets DSN from `SENTRY_DSN` environment variable
+sentry_client = raven.Client()
+
+
def run_files(args):
fmi = FileCleaner(args.api,
dry_run_mode=args.dry_run,