Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 1d12711

Browse files
committed
format
1 parent aee206e commit 1d12711

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@
2121
import logging
2222
import threading
2323
import typing
24-
from typing import Any, Dict, Callable, Iterable, List, Optional, Set, Tuple, Union, Literal
24+
from typing import (
25+
Any,
26+
Dict,
27+
Callable,
28+
Iterable,
29+
List,
30+
Optional,
31+
Set,
32+
Tuple,
33+
Union,
34+
Literal,
35+
)
2536
import uuid
2637

2738
from opentelemetry import trace
@@ -233,7 +244,11 @@ def _process_requests(
233244
requests_to_retry = []
234245
for ack_id, ack_request in ack_reqs_dict.items():
235246
# Debug logging: slow acks
236-
if req_type == "ack" and ack_histogram and ack_request.time_to_ack > ack_histogram.percentile(percent=99):
247+
if (
248+
req_type == "ack"
249+
and ack_histogram
250+
and ack_request.time_to_ack > ack_histogram.percentile(percent=99)
251+
):
237252
_SLOW_ACK_LOGGER.debug(
238253
"Message (id=%s, ack_id=%s) ack duration of %s s is higher than the p99 ack duration",
239254
ack_request.message_id,
@@ -836,7 +851,11 @@ def send_unary_modack(
836851

837852
if self._exactly_once_delivery_enabled():
838853
requests_completed, requests_to_retry = _process_requests(
839-
error_status, ack_reqs_dict, modack_errors_dict, self.ack_histogram, "modack"
854+
error_status,
855+
ack_reqs_dict,
856+
modack_errors_dict,
857+
self.ack_histogram,
858+
"modack",
840859
)
841860
else:
842861
requests_completed = []

0 commit comments

Comments
 (0)