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

Commit 3b146f5

Browse files
committed
fixed tracked flow control
1 parent b33458f commit 3b146f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

google/cloud/bigtable/data/_async/mutations_batcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ async def add_to_flow(self, mutations: RowMutationEntry | list[RowMutationEntry]
181181
)
182182
yield mutations[start_idx:end_idx]
183183

184+
@CrossSync.convert(replace_symbols={"__anext__": "__next__"})
184185
async def add_to_flow_with_metrics(
185186
self,
186187
mutations: RowMutationEntry | list[RowMutationEntry],
@@ -193,7 +194,7 @@ async def add_to_flow_with_metrics(
193194
flow_start_time = time.monotonic_ns()
194195
try:
195196
value = await inner_generator.__anext__()
196-
except StopAsyncIteration:
197+
except CrossSync.StopIteration:
197198
metric.cancel()
198199
return
199200
metric.flow_throttling_time_ns = time.monotonic_ns() - flow_start_time

0 commit comments

Comments
 (0)