Skip to content

Commit

Permalink
fix calc
Browse files Browse the repository at this point in the history
  • Loading branch information
emrgnt-cmplxty committed Jan 8, 2025
1 parent 60f9cfd commit 6092ad8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions py/core/pipes/ingestion/vector_storage_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ async def _run_logic( # type: ignore
for msg in input.message:
if not current_usage:
# ASSUME ONLY ONE OWNER PER MESSAGE
current_usage = await self.database_provider.chunks_handler.get_user_chunk_count(
msg.owner_id
)
current_usage = (
await self.database_provider.chunks_handler.list_chunks(
limit=1, offset=0, filters={"owner_id": msg.owner_id}
)
)["page_info"]["total_entries"]

user = await self.database_provider.users_handler.get_user_by_id(
msg.owner_id
)
Expand Down

0 comments on commit 6092ad8

Please sign in to comment.