From 55a4f211532c93d8164b0d4719dc0413005941ea Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 29 Jan 2020 15:37:38 -0800 Subject: fix KafkaError worker reporting for partition errors --- python/fatcat_tools/importers/common.py | 2 +- python/fatcat_tools/workers/changelog.py | 2 +- python/fatcat_tools/workers/elasticsearch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index 8d103372..1ffbd6e7 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -801,7 +801,7 @@ def make_kafka_consumer(hosts, env, topic_suffix, group, kafka_namespace="fatcat print("Kafka consumer commit error: {}".format(p.error)) print("Bailing out...") # TODO: should it be sys.exit(-1)? - raise KafkaException(err) + raise KafkaException(p.error) #print("Kafka consumer commit successful") pass diff --git a/python/fatcat_tools/workers/changelog.py b/python/fatcat_tools/workers/changelog.py index 81cd0b05..c8584ccf 100644 --- a/python/fatcat_tools/workers/changelog.py +++ b/python/fatcat_tools/workers/changelog.py @@ -151,7 +151,7 @@ class EntityUpdatesWorker(FatcatWorker): print("Kafka consumer commit error: {}".format(p.error)) print("Bailing out...") # TODO: should it be sys.exit(-1)? - raise KafkaException(err) + raise KafkaException(p.error) print("Kafka consumer commit successful") pass diff --git a/python/fatcat_tools/workers/elasticsearch.py b/python/fatcat_tools/workers/elasticsearch.py index 2ba241eb..68d6c304 100644 --- a/python/fatcat_tools/workers/elasticsearch.py +++ b/python/fatcat_tools/workers/elasticsearch.py @@ -46,7 +46,7 @@ class ElasticsearchReleaseWorker(FatcatWorker): print("Kafka consumer commit error: {}".format(p.error)) print("Bailing out...") # TODO: should it be sys.exit(-1)? - raise KafkaException(err) + raise KafkaException(p.error) #print("Kafka consumer commit successful") pass -- cgit v1.2.3