diff options
| author | Dana Powers <dana.powers@gmail.com> | 2017-03-13 16:39:53 -0700 |
|---|---|---|
| committer | Dana Powers <dana.powers@gmail.com> | 2017-03-13 16:39:53 -0700 |
| commit | 92a66e3009147a9909f32df2adedce831b7fc7fb (patch) | |
| tree | 96c4ce4a8789eacaf284cbef8770d992aa665fa6 /kafka/coordinator | |
| parent | 195df5fb9895ec78cd5e25eda30cbec201b4ab4f (diff) | |
| download | kafka-python-92a66e3009147a9909f32df2adedce831b7fc7fb.tar.gz | |
Additional docstrings for autocommit close option
Diffstat (limited to 'kafka/coordinator')
| -rw-r--r-- | kafka/coordinator/base.py | 4 | ||||
| -rw-r--r-- | kafka/coordinator/consumer.py | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py index ab259dd..85b1d78 100644 --- a/kafka/coordinator/base.py +++ b/kafka/coordinator/base.py @@ -538,8 +538,8 @@ class BaseCoordinator(object): self.coordinator_id = None def close(self): - """Close the coordinator, leave the current group - and reset local generation/memberId.""" + """Close the coordinator, leave the current group, + and reset local generation / member_id""" try: self._client.unschedule(self.heartbeat_task) except KeyError: diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index fdbb995..00b8b6b 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -326,6 +326,14 @@ class ConsumerCoordinator(BaseCoordinator): time.sleep(self.config['retry_backoff_ms'] / 1000.0) def close(self, autocommit=True): + """Close the coordinator, leave the current group, + and reset local generation / member_id. + + Keyword Arguments: + autocommit (bool): If auto-commit is configured for this consumer, + this optional flag causes the consumer to attempt to commit any + pending consumed offsets prior to close. Default: True + """ try: if autocommit: self._maybe_auto_commit_offsets_sync() |
