Skip to content

Commit

Permalink
renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Feb 23, 2024
1 parent 6bf526e commit 600ef0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions google/cloud/bigtable/data/_metrics/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def end_attempt_with_status(self, status: StatusCode | Exception) -> None:
)
if isinstance(status, Exception):
status = self._exc_to_status(status)
new_attempt = CompletedAttemptMetric(
complete_attempt = CompletedAttemptMetric(
first_response_latency_ns=self.active_attempt.first_response_latency_ns,
duration_ns=time.monotonic_ns() - self.active_attempt.start_time_ns,
end_status=status,
Expand All @@ -305,10 +305,10 @@ def end_attempt_with_status(self, status: StatusCode | Exception) -> None:
backoff_before_attempt_ns=self.active_attempt.backoff_before_attempt_ns,
grpc_throttling_time_ns=self.active_attempt.grpc_throttling_time_ns,
)
self.completed_attempts.append(new_attempt)
self.completed_attempts.append(complete_attempt)
self.active_attempt = None
for handler in self.handlers:
handler.on_attempt_complete(new_attempt, self)
handler.on_attempt_complete(complete_attempt, self)

def end_with_status(self, status: StatusCode | Exception) -> None:
"""
Expand Down

0 comments on commit 600ef0b

Please sign in to comment.