Skip to content

Commit 36dd105

Browse files
Apply suggestions from code review
Co-authored-by: Miguel Grinberg <[email protected]>
1 parent 1c2800f commit 36dd105

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

elasticsearch/_async/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def async_streaming_bulk(
187187
If you specify ``max_retries`` it will also retry any documents that were
188188
rejected with a ``429`` status code. Use ``retry_on_status`` to
189189
configure which status codes will be retried. To do this it will wait
190-
(**by calling time.sleep which will block**) for ``initial_backoff`` seconds
190+
(**by calling asyncio.sleep which will block**) for ``initial_backoff`` seconds
191191
and then, every subsequent rejection for the same chunk, for double the time
192192
every time up to ``max_backoff`` seconds.
193193
@@ -273,7 +273,7 @@ async def map_actions() -> AsyncIterable[_TYPE_BULK_ACTION_HEADER_AND_BODY]:
273273
if not ok:
274274
action, info = info.popitem()
275275
# retry if retries enabled, we are not in the last attempt,
276-
# and status not in retry_on_status (defaulting to 429)
276+
# and status in retry_on_status (defaulting to 429)
277277
if (
278278
max_retries
279279
and info["status"] in retry_on_status

elasticsearch/helpers/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def streaming_bulk(
467467
if not ok:
468468
action, info = info.popitem()
469469
# retry if retries enabled, we are not in the last attempt,
470-
# and status not in retry_on_status (defaulting to 429)
470+
# and status in retry_on_status (defaulting to 429)
471471
if (
472472
max_retries
473473
and info["status"] in retry_on_status

0 commit comments

Comments
 (0)