Skip to content

Commit

Permalink
right method
Browse files Browse the repository at this point in the history
  • Loading branch information
rescrv committed Dec 18, 2024
1 parent 9ed5b07 commit 7ba9ee1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions chromadb/server/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,17 +1586,19 @@ async def get_collection_v1(
if maybe_database:
database = maybe_database

api_collection_model = cast(
CollectionModel,
await to_thread.run_sync(
self._api.get_collection,
collection_name,
tenant,
database,
limiter=self._capacity_limiter,
),
)
return api_collection_model
async def inner():
api_collection_model = cast(
CollectionModel,
await to_thread.run_sync(
self._api.get_collection,
collection_name,
tenant,
database,
limiter=self._capacity_limiter,
),
)
return api_collection_model
return await inner()

@trace_method("FastAPI.update_collection_v1", OpenTelemetryGranularity.OPERATION)
async def update_collection_v1(
Expand Down

0 comments on commit 7ba9ee1

Please sign in to comment.