diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-08 21:10:45 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-20 11:21:10 -0700 |
commit | a8cde38d7f95908049d50d0b94ed33f3aa2cc75d (patch) | |
tree | d6fe260cb0de43c2d1f97f1cb82a136d4fb48f8a /python/fatcat_tools/importers | |
parent | e0d7a847515314d5deb479074cc809b4aa46404c (diff) | |
download | fatcat-a8cde38d7f95908049d50d0b94ed33f3aa2cc75d.tar.gz fatcat-a8cde38d7f95908049d50d0b94ed33f3aa2cc75d.zip |
small kafka tweaks for robustness
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r-- | python/fatcat_tools/importers/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index 11ea6880..32bb210a 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -775,6 +775,9 @@ def make_kafka_consumer(hosts, env, topic_suffix, group): } def on_rebalance(consumer, partitions): + for p in partitions: + if p.error: + raise KafkaException(p.error) print("Kafka partitions rebalanced: {} / {}".format( consumer, partitions)) |