aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpython/fatcat_cleanup.py6
-rwxr-xr-xpython/fatcat_import.py6
-rwxr-xr-xpython/fatcat_ingest.py9
3 files changed, 19 insertions, 2 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,
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index fb8830ca..5b97d3a8 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -1,10 +1,16 @@
#!/usr/bin/env python3
import os, sys, argparse
+import raven
+
from fatcat_tools import authenticated_api
from fatcat_tools.importers import *
+# Yep, a global. Gets DSN from `SENTRY_DSN` environment variable
+sentry_client = raven.Client()
+
+
def run_crossref(args):
fci = CrossrefImporter(args.api,
args.issn_map_file,
diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py
index 9f0bf22e..0df4674e 100755
--- a/python/fatcat_ingest.py
+++ b/python/fatcat_ingest.py
@@ -9,11 +9,16 @@ import sys
import json
import argparse
from collections import Counter
+import raven
+import elasticsearch
+from elasticsearch_dsl import Search
from fatcat_tools import public_api, simple_kafka_producer, kafka_fail_fast
from fatcat_tools.transforms import release_ingest_request
-import elasticsearch
-from elasticsearch_dsl import Search
+
+
+# Yep, a global. Gets DSN from `SENTRY_DSN` environment variable
+sentry_client = raven.Client()
def run_ingest_container(args):