From 01f378328e5383d05d52428b815f992eb2c536cb Mon Sep 17 00:00:00 2001 From: Will Daly Date: Sun, 4 Jan 2015 12:23:10 -0500 Subject: Add Sphinx API docs --- kafka/context.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kafka/context.py') diff --git a/kafka/context.py b/kafka/context.py index 98ed7b3..ade4db8 100644 --- a/kafka/context.py +++ b/kafka/context.py @@ -18,6 +18,8 @@ class OffsetCommitContext(object): Example: + .. code:: python + consumer = SimpleConsumer(client, group, topic, auto_commit=False) consumer.provide_partition_info() consumer.fetch_last_known_offsets() @@ -57,7 +59,10 @@ class OffsetCommitContext(object): In order to know the current partition, it is helpful to initialize the consumer to provide partition info via: + .. code:: python + consumer.provide_partition_info() + """ max_offset = max(offset + 1, self.high_water_mark.get(partition, 0)) -- cgit v1.2.1