Skip to content

Commit eb74572

Browse files
committed
added comment
1 parent 58334f7 commit eb74572

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

google/api_core/retry/retry_streaming.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ def retry_target_stream(
109109
error_list: list[Exception] = []
110110
sleep_iter = iter(sleep_generator)
111111

112+
# continue trying until an attempt completes, or a terminal exception is raised in _retry_error_helper
113+
# TODO: support max_attempts argument: https://github.com/googleapis/python-api-core/issues/535
112114
while True:
113115
# Start a new retry loop
114116
try:

google/api_core/retry/retry_streaming_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ async def retry_target_stream(
112112
sleep_iter = iter(sleep_generator)
113113
target_is_generator: bool | None = None
114114

115+
# continue trying until an attempt completes, or a terminal exception is raised in _retry_error_helper
116+
# TODO: support max_attempts argument: https://github.com/googleapis/python-api-core/issues/535
115117
while True:
116118
# Start a new retry loop
117119
try:

google/api_core/retry/retry_unary.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ def retry_target(
140140
error_list: list[Exception] = []
141141
sleep_iter = iter(sleep_generator)
142142

143+
# continue trying until an attempt completes, or a terminal exception is raised in _retry_error_helper
144+
# TODO: support max_attempts argument: https://github.com/googleapis/python-api-core/issues/535
143145
while True:
144146
try:
145147
result = target()

google/api_core/retry/retry_unary_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ async def retry_target(
151151
error_list: list[Exception] = []
152152
sleep_iter = iter(sleep_generator)
153153

154+
# continue trying until an attempt completes, or a terminal exception is raised in _retry_error_helper
155+
# TODO: support max_attempts argument: https://github.com/googleapis/python-api-core/issues/535
154156
while True:
155157
try:
156158
return await target()

0 commit comments

Comments
 (0)