mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-27 15:12:53 +00:00
use requests instead of aiohttp for underlying http client (#803)
instead of starting and stopping the current thread's event loop on every http call, just make an http call.
This commit is contained in:
committed by
Andrew Miracle
parent
91d64d86e0
commit
eda4c587fc
@@ -18,15 +18,15 @@ from lancedb.remote.client import VectorQuery, VectorQueryResult
|
||||
|
||||
|
||||
class FakeLanceDBClient:
|
||||
async def close(self):
|
||||
def close(self):
|
||||
pass
|
||||
|
||||
async def query(self, table_name: str, query: VectorQuery) -> VectorQueryResult:
|
||||
def query(self, table_name: str, query: VectorQuery) -> VectorQueryResult:
|
||||
assert table_name == "test"
|
||||
t = pa.schema([]).empty_table()
|
||||
return VectorQueryResult(t)
|
||||
|
||||
async def post(self, path: str):
|
||||
def post(self, path: str):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user