mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-15 00:40:56 +00:00
Fix JSON error logging in Redis storage implementations
This commit is contained in:
parent
e54bcff85c
commit
45d38fa083
@ -349,8 +349,8 @@ class RedisKVStorage(BaseKVStorage):
|
|||||||
pipe.set(f"{self.namespace}:{k}", json.dumps(v))
|
pipe.set(f"{self.namespace}:{k}", json.dumps(v))
|
||||||
await pipe.execute()
|
await pipe.execute()
|
||||||
|
|
||||||
except json.JSONEncodeError as e:
|
except json.JSONDecodeError as e:
|
||||||
logger.error(f"JSON encode error during upsert: {e}")
|
logger.error(f"JSON decode error during upsert: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
async def index_done_callback(self) -> None:
|
async def index_done_callback(self) -> None:
|
||||||
@ -807,8 +807,8 @@ class RedisDocStatusStorage(DocStatusStorage):
|
|||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
pipe.set(f"{self.namespace}:{k}", json.dumps(v))
|
pipe.set(f"{self.namespace}:{k}", json.dumps(v))
|
||||||
await pipe.execute()
|
await pipe.execute()
|
||||||
except json.JSONEncodeError as e:
|
except json.JSONDecodeError as e:
|
||||||
logger.error(f"JSON encode error during upsert: {e}")
|
logger.error(f"JSON decode error during upsert: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
async def get_by_id(self, id: str) -> Union[dict[str, Any], None]:
|
async def get_by_id(self, id: str) -> Union[dict[str, Any], None]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user