Skip to content

Commit 72445f1

Browse files
opyateJon Wayne Parrott
authored andcommitted
Clarify that modify_ack_deadline resets the deadline (googleapis#4822)
1 parent a5bb904 commit 72445f1

File tree

1 file changed

+3
-6
lines changed
  • pubsub/google/cloud/pubsub_v1/subscriber

1 file changed

+3
-6
lines changed

pubsub/google/cloud/pubsub_v1/subscriber/message.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,15 @@ def lease(self):
223223
)
224224

225225
def modify_ack_deadline(self, seconds):
226-
"""Set the deadline for acknowledgement to the given value.
226+
"""Resets the deadline for acknowledgement.
227+
228+
New deadline will be the given value of seconds from now.
227229
228230
The default implementation handles this for you; you should not need
229231
to manually deal with setting ack deadlines. The exception case is
230232
if you are implementing your own custom subclass of
231233
:class:`~.pubsub_v1.subcriber._consumer.Consumer`.
232234
233-
.. note::
234-
This is not an extension; it *sets* the deadline to the given
235-
number of seconds from right now. It is even possible to use this
236-
method to make a deadline shorter.
237-
238235
Args:
239236
seconds (int): The number of seconds to set the lease deadline
240237
to. This should be between 0 and 600. Due to network latency,

0 commit comments

Comments
 (0)