mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-25 13:52:29 +00:00
Change get_by_id batch size from 25 to 5 to reserve db connection resouces
This commit is contained in:
parent
3a5a921fde
commit
b45c5f9304
@ -9,9 +9,9 @@ if not pm.is_installed("redis"):
|
||||
pm.install("redis")
|
||||
|
||||
# aioredis is a depricated library, replaced with redis
|
||||
from redis.asyncio import Redis, ConnectionPool
|
||||
from redis.exceptions import RedisError, ConnectionError
|
||||
from lightrag.utils import logger, compute_mdhash_id
|
||||
from redis.asyncio import Redis, ConnectionPool # type: ignore
|
||||
from redis.exceptions import RedisError, ConnectionError # type: ignore
|
||||
from lightrag.utils import logger
|
||||
|
||||
from lightrag.base import BaseKVStorage
|
||||
import json
|
||||
|
||||
@ -1395,7 +1395,7 @@ async def _find_most_related_text_unit_from_entities(
|
||||
tasks.append((c_id, index, this_edges))
|
||||
|
||||
# Process in batches of 25 tasks at a time to avoid overwhelming resources
|
||||
batch_size = 25
|
||||
batch_size = 5
|
||||
results = []
|
||||
|
||||
for i in range(0, len(tasks), batch_size):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user