Skip to content

Commit 25bd05a

Browse files
committed
rename async_fulltext_search to fulltext_search_async
1 parent 5c123d4 commit 25bd05a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

openlibrary/core/fulltext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def fulltext_search_api(params):
4646
return {'error': 'Error converting search engine data to JSON'}
4747

4848

49-
async def async_fulltext_search(q, page=1, limit=100, js=False, facets=False):
49+
async def fulltext_search_async(q, page=1, limit=100, js=False, facets=False):
5050
offset = (page - 1) * limit
5151
params = {
5252
'q': q,
@@ -101,5 +101,5 @@ async def setup_env_vars():
101101

102102

103103
fulltext_search = async_bridge.wrap(
104-
async_fulltext_search, init_ctx_factory=ctx_func_factory
104+
fulltext_search_async, init_ctx_factory=ctx_func_factory
105105
)

openlibrary/fastapi/search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from fastapi import APIRouter, Query, Request
44
from fastapi.responses import JSONResponse
55

6-
from openlibrary.core.fulltext import async_fulltext_search
6+
from openlibrary.core.fulltext import fulltext_search_async
77
from openlibrary.plugins.worksearch.code import async_work_search
88
from openlibrary.plugins.worksearch.schemes.works import WorkSearchScheme
99

@@ -73,4 +73,4 @@ async def search_inside_json(
7373
page: int | None = Query(1, ge=1, description="Page number"),
7474
limit: int | None = Query(20, ge=1, le=20, description="Results per page"),
7575
):
76-
return await async_fulltext_search(q, page=page, limit=limit, js=True, facets=True)
76+
return await fulltext_search_async(q, page=page, limit=limit, js=True, facets=True)

0 commit comments

Comments
 (0)