Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
  • Loading branch information
pquentin and miguelgrinberg authored Nov 12, 2024
1 parent 1c2800f commit 36dd105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/_async/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async def async_streaming_bulk(
If you specify ``max_retries`` it will also retry any documents that were
rejected with a ``429`` status code. Use ``retry_on_status`` to
configure which status codes will be retried. To do this it will wait
(**by calling time.sleep which will block**) for ``initial_backoff`` seconds
(**by calling asyncio.sleep which will block**) for ``initial_backoff`` seconds
and then, every subsequent rejection for the same chunk, for double the time
every time up to ``max_backoff`` seconds.
Expand Down Expand Up @@ -273,7 +273,7 @@ async def map_actions() -> AsyncIterable[_TYPE_BULK_ACTION_HEADER_AND_BODY]:
if not ok:
action, info = info.popitem()
# retry if retries enabled, we are not in the last attempt,
# and status not in retry_on_status (defaulting to 429)
# and status in retry_on_status (defaulting to 429)
if (
max_retries
and info["status"] in retry_on_status
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/helpers/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def streaming_bulk(
if not ok:
action, info = info.popitem()
# retry if retries enabled, we are not in the last attempt,
# and status not in retry_on_status (defaulting to 429)
# and status in retry_on_status (defaulting to 429)
if (
max_retries
and info["status"] in retry_on_status
Expand Down

0 comments on commit 36dd105

Please sign in to comment.