Skip to content

Commit

Permalink
Merge pull request #389 from a-shkarupin/assertion_message
Browse files Browse the repository at this point in the history
add assertion error description for easier debugging
  • Loading branch information
sibiryakov authored Nov 29, 2019
2 parents b98accd + d5f5905 commit 84f9e10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontera/contrib/messagebus/kafkabus.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def __init__(self, messagebus):

def consumer(self, partition_id):
c = Consumer(self._location, self._enable_ssl, self._cert_path, self._topic, self._general_group, partition_id)
assert len(c._consumer.partitions_for_topic(self._topic)) == self._partitions
assert len(c._consumer.partitions_for_topic(self._topic)) == self._partitions, \
"Number of kafka topic partitions doesn't match value in config for spider feed"
return c

def available_partitions(self):
Expand Down

0 comments on commit 84f9e10

Please sign in to comment.