Skip to content

Commit

Permalink
Revert "dont wait for indexes to be ready"
Browse files Browse the repository at this point in the history
This reverts commit 8ea5dfe.
  • Loading branch information
SimonThordal committed Jul 15, 2024
1 parent 8ea5dfe commit c138ea1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions yente/provider/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ async def create(cls) -> "ElasticSearchProvider":
for retry in range(2, 9):
try:
es = AsyncElasticsearch(**kwargs)
# es_ = es.options(request_timeout=15)
# await es_.cluster.health(wait_for_status="yellow")
es_ = es.options(request_timeout=15)
await es_.cluster.health(wait_for_status="yellow")
return ElasticSearchProvider(es)
except (TransportError, ConnectionError) as exc:
log.error("Cannot connect to ElasticSearch: %r" % exc)
Expand Down
2 changes: 1 addition & 1 deletion yente/provider/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def create(cls) -> "OpenSearchProvider":
for retry in range(2, 9):
try:
es = AsyncOpenSearch(**kwargs)
# await es.cluster.health(wait_for_status="yellow")
await es.cluster.health(wait_for_status="yellow")
return OpenSearchProvider(es)
except (TransportError, ConnectionError) as exc:
log.error("Cannot connect to OpenSearch: %r" % exc)
Expand Down

0 comments on commit c138ea1

Please sign in to comment.