Skip to content

Commit

Permalink
Reword some comments with "exactly-once delivery"
Browse files Browse the repository at this point in the history
  • Loading branch information
pradn committed Feb 25, 2022
1 parent 4b5f846 commit 32fbbb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions google/cloud/pubsub_v1/subscriber/_protocol/dispatcher.py
Expand Up @@ -70,11 +70,11 @@

_MIN_EXACTLY_ONCE_DELIVERY_ACK_MODACK_RETRY_DURATION_SECS = 1
"""The time to wait for the first retry of failed acks and modacks when exactly-once
is enabled."""
delivery is enabled."""

_MAX_EXACTLY_ONCE_DELIVERY_ACK_MODACK_RETRY_DURATION_SECS = 10 * 60
"""The maximum amount of time in seconds to retry failed acks and modacks when
exactly-once is enabled."""
exactly-once delivery is enabled."""


class Dispatcher(object):
Expand Down
Expand Up @@ -385,7 +385,8 @@ def _obtain_ack_deadline(self, maybe_update: bool) -> float:
)
self._ack_deadline = max(self._ack_deadline, flow_control_setting)
elif self._exactly_once_enabled:
# Higher minimum ack_deadline for exactly_once subscriptions.
# Higher minimum ack_deadline for subscriptions with
# exactly-once delivery enabled.
self._ack_deadline = max(
self._ack_deadline, _MIN_ACK_DEADLINE_SECS_WHEN_EXACTLY_ONCE_ENABLED
)
Expand Down Expand Up @@ -652,7 +653,7 @@ def heartbeat(self) -> bool:
"""Sends a heartbeat request over the streaming pull RPC.
The request is empty by default, but may contain the current ack_deadline
if the exactly_once flag has changed.
if the self._exactly_once_enabled flag has changed.
Returns:
If a heartbeat request has actually been sent.
Expand Down

0 comments on commit 32fbbb4

Please sign in to comment.