Skip to content

Commit 3456ded

Browse files
committed
Document unit (Seconds) for timeout parameters (closes confluentinc#285)
1 parent c7ea011 commit 3456ded

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

confluent_kafka/src/Consumer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ static PyMethodDef Consumer_methods[] = {
988988
" .. note: Callbacks may be called from this method, "
989989
"such as ``on_assign``, ``on_revoke``, et.al.\n"
990990
"\n"
991-
" :param float timeout: Maximum time to block waiting for message, event or callback.\n"
991+
" :param float timeout: Maximum time to block waiting for message, event or callback. (Seconds)\n"
992992
" :returns: A Message object or None on timeout\n"
993993
" :rtype: :py:class:`Message` or None\n"
994994
" :raises: RuntimeError if called on a closed consumer\n"
@@ -1011,7 +1011,7 @@ static PyMethodDef Consumer_methods[] = {
10111011
"such as ``on_assign``, ``on_revoke``, et.al.\n"
10121012
"\n"
10131013
" :param int num_messages: Maximum number of messages to return (default: 1).\n"
1014-
" :param float timeout: Maximum time to block waiting for message, event or callback (default: infinite (-1)).\n"
1014+
" :param float timeout: Maximum time to block waiting for message, event or callback (default: infinite (-1)). (Seconds)\n"
10151015
" :returns: A list of Message objects (possibly empty on timeout)\n"
10161016
" :rtype: list(Message)\n"
10171017
" :raises: RuntimeError if called on a closed consumer, KafkaError "
@@ -1090,7 +1090,7 @@ static PyMethodDef Consumer_methods[] = {
10901090
"\n"
10911091
" :param list(TopicPartition) partitions: List of topic+partitions "
10921092
"to query for stored offsets.\n"
1093-
" :param float timeout: Request timeout\n"
1093+
" :param float timeout: Request timeout. (Seconds)\n"
10941094
" :returns: List of topic+partitions with offset and possibly error set.\n"
10951095
" :rtype: list(TopicPartition)\n"
10961096
" :raises: KafkaException\n"
@@ -1143,7 +1143,7 @@ static PyMethodDef Consumer_methods[] = {
11431143
" Retrieve low and high offsets for partition.\n"
11441144
"\n"
11451145
" :param TopicPartition partition: Topic+partition to return offsets for."
1146-
" :param float timeout: Request timeout (when cached=False).\n"
1146+
" :param float timeout: Request timeout (when cached=False). (Seconds)\n"
11471147
" :param bool cached: Instead of querying the broker used cached information. "
11481148
"Cached values: The low offset is updated periodically (if statistics.interval.ms is set) while "
11491149
"the high offset is updated on each message fetched from the broker for this partition."
@@ -1164,7 +1164,7 @@ static PyMethodDef Consumer_methods[] = {
11641164
" corresponding partition.\n"
11651165
"\n"
11661166
" :param list(TopicPartition) partitions: topic+partitions with timestamps in the TopicPartition.offset field."
1167-
" :param float timeout: Request timeout.\n"
1167+
" :param float timeout: Request timeout. (Seconds)\n"
11681168
" :returns: list of topic+partition with offset field set and possibly error set\n"
11691169
" :rtype: list(TopicPartition)\n"
11701170
" :raises: KafkaException\n"

confluent_kafka/src/Producer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static PyMethodDef Producer_methods[] = {
488488
" - ``on_delivery`` callbacks from :py:func:`produce()`\n"
489489
" - ...\n"
490490
"\n"
491-
" :param float timeout: Maximum time to block waiting for events.\n"
491+
" :param float timeout: Maximum time to block waiting for events. (Seconds)\n"
492492
" :returns: Number of events processed (callbacks served)\n"
493493
" :rtype: int\n"
494494
"\n"
@@ -501,7 +501,7 @@ static PyMethodDef Producer_methods[] = {
501501
" This is a convenience method that calls :py:func:`poll()` until "
502502
":py:func:`len()` is zero or the optional timeout elapses.\n"
503503
"\n"
504-
" :param: float timeout: Maximum time to block (requires librdkafka >= v0.9.4).\n"
504+
" :param: float timeout: Maximum time to block (requires librdkafka >= v0.9.4). (Seconds)\n"
505505
" :returns: Number of messages still in queue.\n"
506506
"\n"
507507
".. note:: See :py:func:`poll()` for a description on what "

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy