Skip to content

Commit

Permalink
Reverted more changes to reduce the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
rogaha committed May 12, 2015
1 parent be678a1 commit e88ecec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kafka/producer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def _send_messages(self, topic, partition, *msg, **kwargs):
resp = self.client.send_produce_request([req], acks=self.req_acks,
timeout=self.ack_timeout)
except:
log.exception('Unable to send messages. Topics: {0} Number of msgs: {1}'.format(topic, len(messages)))
log.exception("Unable to send messages")
raise
return resp

Expand Down
5 changes: 1 addition & 4 deletions kafka/producer/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
BATCH_SEND_MSG_COUNT
)

log = logging.getLogger(__name__)
log = logging.getLogger("kafka")


class SimpleProducer(Producer):
Expand Down Expand Up @@ -57,9 +57,6 @@ def __init__(self, client, async=False,
maxsize)

def _next_partition(self, topic):
# for each message sent a partition is chosen, if random_start is True
# a random partition is selected, otherwise the next partition in the cycle
# is picked up
if topic not in self.partition_cycles:
if not self.client.has_metadata_for_topic(topic):
self.client.load_metadata_for_topics(topic)
Expand Down

0 comments on commit e88ecec

Please sign in to comment.