Skip to content

Commit

Permalink
import async_bulk directly
Browse files Browse the repository at this point in the history
  • Loading branch information
akotlar committed Oct 20, 2023
1 parent 8d5b9d8 commit b075aaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/python/bystro/search/index/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from math import ceil

import ray
from opensearchpy._async import helpers as async_helpers
from opensearchpy._async.helpers.actions import async_bulk
from opensearchpy._async.client import AsyncOpenSearch
from ruamel.yaml import YAML

Expand Down Expand Up @@ -43,7 +43,7 @@ def __init__(

async def index(self, data):
"""Index Bystro annotation data into Opensearch"""
resp = await async_helpers.async_bulk(self.client, iter(data), chunk_size=self.chunk_size)
resp = await async_bulk(self.client, iter(data), chunk_size=self.chunk_size)
self.counter += resp[0]

if self.counter >= self.reporter_batch:
Expand Down

0 comments on commit b075aaa

Please sign in to comment.