Skip to content

Commit fc5cada

Browse files
committed
remvoed duplicate arguments
1 parent cd65fc6 commit fc5cada

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

google/cloud/bigtable/data/_metrics/tracked_retry.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
def _track_retryable_error(
4646
operation: ActiveOperationMetric,
47-
backoff_generator: TrackedBackoffGenerator,
4847
) -> Callable[[Exception], None]:
4948
"""
5049
Used as input to api_core.Retry classes, to track when retryable errors are encountered
@@ -68,7 +67,7 @@ def wrapper(exc: Exception) -> None:
6867
if exc.details:
6968
info_matches = [field for field in exc.details if isinstance(field, RetryInfo)]
7069
if info_matches:
71-
backoff_generator.set_from_exception_info(info_matches[0])
70+
operation.backoff_generator.set_from_exception_info(info_matches[0])
7271
except Exception:
7372
# ignore errors in metadata collection
7473
pass
@@ -137,7 +136,7 @@ def tracked_retry(
137136
kwargs.pop("sleep_generator", None)
138137
return retry_fn(
139138
sleep_generator=operation.backoff_generator,
140-
on_error=_track_retryable_error(operation, operation.backoff_generator),
139+
on_error=_track_retryable_error(operation),
141140
exception_factory=_track_terminal_error(operation, in_exception_factory),
142141
**kwargs,
143142
)

0 commit comments

Comments
 (0)