Optimize logger for storage
This commit is contained in:
@@ -116,7 +116,7 @@ class JsonDocStatusStorage(DocStatusStorage):
|
|||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
logger.info(f"Inserting {len(data)} records to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} records to {self.namespace}")
|
||||||
async with self._storage_lock:
|
async with self._storage_lock:
|
||||||
self._data.update(data)
|
self._data.update(data)
|
||||||
await set_all_update_flags(self.namespace)
|
await set_all_update_flags(self.namespace)
|
||||||
|
@@ -121,7 +121,7 @@ class JsonKVStorage(BaseKVStorage):
|
|||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
logger.info(f"Inserting {len(data)} records to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} records to {self.namespace}")
|
||||||
async with self._storage_lock:
|
async with self._storage_lock:
|
||||||
self._data.update(data)
|
self._data.update(data)
|
||||||
await set_all_update_flags(self.namespace)
|
await set_all_update_flags(self.namespace)
|
||||||
|
@@ -85,7 +85,7 @@ class NanoVectorDBStorage(BaseVectorStorage):
|
|||||||
KG-storage-log should be used to avoid data corruption
|
KG-storage-log should be used to avoid data corruption
|
||||||
"""
|
"""
|
||||||
|
|
||||||
logger.info(f"Inserting {len(data)} to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} to {self.namespace}")
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@@ -392,7 +392,7 @@ class NetworkXStorage(BaseGraphStorage):
|
|||||||
# Check if storage was updated by another process
|
# Check if storage was updated by another process
|
||||||
if self.storage_updated.value:
|
if self.storage_updated.value:
|
||||||
# Storage was updated by another process, reload data instead of saving
|
# Storage was updated by another process, reload data instead of saving
|
||||||
logger.warning(
|
logger.info(
|
||||||
f"Graph for {self.namespace} was updated by another process, reloading..."
|
f"Graph for {self.namespace} was updated by another process, reloading..."
|
||||||
)
|
)
|
||||||
self._graph = (
|
self._graph = (
|
||||||
|
@@ -361,7 +361,7 @@ class PGKVStorage(BaseKVStorage):
|
|||||||
|
|
||||||
################ INSERT METHODS ################
|
################ INSERT METHODS ################
|
||||||
async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
|
async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
|
||||||
logger.info(f"Inserting {len(data)} to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} to {self.namespace}")
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ class PGVectorStorage(BaseVectorStorage):
|
|||||||
return upsert_sql, data
|
return upsert_sql, data
|
||||||
|
|
||||||
async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
|
async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
|
||||||
logger.info(f"Inserting {len(data)} to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} to {self.namespace}")
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -949,7 +949,7 @@ class PGDocStatusStorage(DocStatusStorage):
|
|||||||
Args:
|
Args:
|
||||||
data: dictionary of document IDs and their status data
|
data: dictionary of document IDs and their status data
|
||||||
"""
|
"""
|
||||||
logger.info(f"Inserting {len(data)} to {self.namespace}")
|
logger.debug(f"Inserting {len(data)} to {self.namespace}")
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user