From 5f3e210246e20a4b6ea4ee725d313d65f1ae3e4f Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 29 Apr 2025 13:32:05 +0800 Subject: [PATCH] Optimize log messages --- lightrag/kg/shared_storage.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lightrag/kg/shared_storage.py b/lightrag/kg/shared_storage.py index 10e83e56..b5d56f5d 100644 --- a/lightrag/kg/shared_storage.py +++ b/lightrag/kg/shared_storage.py @@ -122,16 +122,20 @@ class UnifiedLock(Generic[T]): self._lock.release() else: self._lock.release() - main_lock_released = True + direct_log( + f"== Lock == Process {self._pid}: Lock '{self._name}' released (async={self._is_async})", + enable_output=self._enable_logging, + ) + # Then release async lock if in multiprocess mode if not self._is_async and self._async_lock is not None: - # direct_log( - # f"== Lock == Process {self._pid}: Releasing async lock for '{self._name}'", - # enable_output=self._enable_logging, - # ) self._async_lock.release() + direct_log( + f"== Lock == Process {self._pid}: Async lock '{self._name}' released", + enable_output=self._enable_logging, + ) direct_log( f"== Lock == Process {self._pid}: Lock '{self._name}' released (async={self._is_async})",