diff options
author | Dana Powers <dana.powers@gmail.com> | 2015-01-23 09:41:03 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2015-01-23 09:41:03 -0800 |
commit | 587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc (patch) | |
tree | a2d6f02a0c79ab3774527df39faf21deb4632936 /kafka/context.py | |
parent | e6b37c00c5b0a52f821b35a4e26c0943f3e05b07 (diff) | |
parent | 01f378328e5383d05d52428b815f992eb2c536cb (diff) | |
download | kafka-python-587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc.tar.gz |
Merge pull request #282 from wedaly/sphinx-api-docs
Add Sphinx API docs
Diffstat (limited to 'kafka/context.py')
-rw-r--r-- | kafka/context.py | 5 |
1 files changed, 5 insertions, 0 deletions
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)) |