diff options
author | Dominic Evans <dominic.evans@uk.ibm.com> | 2017-07-26 20:58:21 +0100 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2017-07-26 13:18:14 -0700 |
commit | ca02bb17bf0d7913736596594874c0274f1b7653 (patch) | |
tree | be8675e25ad70e1ae4a913905f63588a21c3ab89 | |
parent | 165b897139ae69e5935c2618759773572781ef17 (diff) | |
download | kafka-python-ca02bb17bf0d7913736596594874c0274f1b7653.tar.gz |
Fix batch expiry messages to state seconds
time.time() is seconds since epoch, and the deltas are also calculated
in seconds
-rw-r--r-- | kafka/producer/record_accumulator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/producer/record_accumulator.py b/kafka/producer/record_accumulator.py index 3e97fd7..fa835f3 100644 --- a/kafka/producer/record_accumulator.py +++ b/kafka/producer/record_accumulator.py @@ -103,11 +103,11 @@ class RecordBatch(object): error = None if not self.in_retry() and is_full and timeout < since_append: - error = "%d ms has passed since last append" % since_append + error = "%d seconds have passed since last append" % since_append elif not self.in_retry() and timeout < since_ready: - error = "%d ms has passed since batch creation plus linger time" % since_ready + error = "%d seconds have passed since batch creation plus linger time" % since_ready elif self.in_retry() and timeout < since_backoff: - error = "%d ms has passed since last attempt plus backoff time" % since_backoff + error = "%d seconds have passed since last attempt plus backoff time" % since_backoff if error: self.records.close() |