aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_ingest.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_ingest.py')
-rwxr-xr-xpython/fatcat_ingest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py
index 3f8666ca..96fef8fe 100755
--- a/python/fatcat_ingest.py
+++ b/python/fatcat_ingest.py
@@ -17,16 +17,13 @@ from elasticsearch_dsl import Q, Search
from fatcat_tools import kafka_fail_fast, public_api, simple_kafka_producer
from fatcat_tools.transforms import release_ingest_request
-# Yep, a global. Gets DSN from `SENTRY_DSN` environment variable
-sentry_client = sentry_sdk.init()
-
def _init_search(args: argparse.Namespace) -> Search:
# ensure API connection works
args.api.get_changelog()
- client = elasticsearch.Elasticsearch(args.elasticsearch_endpoint)
+ client = elasticsearch.Elasticsearch(args.elasticsearch_endpoint, timeout=120.0)
search = Search(using=client, index=args.elasticsearch_index)
return search
@@ -267,6 +264,7 @@ def main() -> None:
sys.exit(-1)
args.api = public_api(args.fatcat_api_url)
+ sentry_sdk.init(environment=args.env)
args.func(args)