diff options
author | ms7s <martin.sucha@exponea.com> | 2016-06-21 17:28:59 +0200 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-06-21 08:28:59 -0700 |
commit | ccbb189c025acf35e8ae5902c7992aa835edbcf1 (patch) | |
tree | c2b17ebf17c68be38bd8b5c149134f2d96466609 | |
parent | cbcb4a6f857b5fe3609c5713ae17e30e2ae66d79 (diff) | |
download | kafka-python-ccbb189c025acf35e8ae5902c7992aa835edbcf1.tar.gz |
Clarify timeout unit (#734)
-rw-r--r-- | kafka/producer/kafka.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index 2185869..7c55b27 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -330,7 +330,11 @@ class KafkaProducer(object): self.close(timeout=0) def close(self, timeout=None): - """Close this producer.""" + """Close this producer. + + Arguments: + timeout (float, optional): timeout in seconds to wait for completion. + """ # drop our atexit handler now to avoid leaks self._unregister_cleanup() @@ -476,6 +480,9 @@ class KafkaProducer(object): Other threads can continue sending messages while one thread is blocked waiting for a flush call to complete; however, no guarantee is made about the completion of messages sent after the flush call begins. + + Arguments: + timeout (float, optional): timeout in seconds to wait for completion. """ log.debug("Flushing accumulated records in producer.") # trace self._accumulator.begin_flush() |