Skip to content

Commit

Permalink
Clean up yente.search.base - no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Jul 18, 2024
1 parent 25df306 commit 24c4c04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
5 changes: 5 additions & 0 deletions yente/provider/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from asyncio import Semaphore
from typing import Any, Dict, List, Optional
from typing import AsyncIterator

from yente import settings

query_semaphore = Semaphore(settings.QUERY_CONCURRENCY)


class SearchProvider(object):
async def close(self) -> None:
Expand Down
3 changes: 1 addition & 2 deletions yente/provider/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
from yente import settings
from yente.exc import IndexNotReadyError, YenteIndexError, YenteNotFoundError
from yente.logs import get_logger
from yente.search.base import query_semaphore
from yente.search.mapping import make_entity_mapping, INDEX_SETTINGS
from yente.provider.base import SearchProvider
from yente.provider.base import SearchProvider, query_semaphore

log = get_logger(__name__)
warnings.filterwarnings("ignore", category=ElasticsearchWarning)
Expand Down
3 changes: 1 addition & 2 deletions yente/provider/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
from yente import settings
from yente.exc import IndexNotReadyError, YenteIndexError, YenteNotFoundError
from yente.logs import get_logger
from yente.search.base import query_semaphore
from yente.search.mapping import make_entity_mapping, INDEX_SETTINGS
from yente.provider.base import SearchProvider
from yente.provider.base import SearchProvider, query_semaphore

log = get_logger(__name__)
logging.getLogger("opensearch").setLevel(logging.ERROR)
Expand Down
15 changes: 0 additions & 15 deletions yente/search/base.py

This file was deleted.

0 comments on commit 24c4c04

Please sign in to comment.