yangdx
commited on
Commit
·
8546ae8
1
Parent(s):
92f034b
Optimize log messages
Browse files
lightrag/kg/shared_storage.py
CHANGED
@@ -122,16 +122,20 @@ class UnifiedLock(Generic[T]):
|
|
122 |
self._lock.release()
|
123 |
else:
|
124 |
self._lock.release()
|
125 |
-
|
126 |
main_lock_released = True
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
# Then release async lock if in multiprocess mode
|
129 |
if not self._is_async and self._async_lock is not None:
|
130 |
-
# direct_log(
|
131 |
-
# f"== Lock == Process {self._pid}: Releasing async lock for '{self._name}'",
|
132 |
-
# enable_output=self._enable_logging,
|
133 |
-
# )
|
134 |
self._async_lock.release()
|
|
|
|
|
|
|
|
|
135 |
|
136 |
direct_log(
|
137 |
f"== Lock == Process {self._pid}: Lock '{self._name}' released (async={self._is_async})",
|
|
|
122 |
self._lock.release()
|
123 |
else:
|
124 |
self._lock.release()
|
|
|
125 |
main_lock_released = True
|
126 |
|
127 |
+
direct_log(
|
128 |
+
f"== Lock == Process {self._pid}: Lock '{self._name}' released (async={self._is_async})",
|
129 |
+
enable_output=self._enable_logging,
|
130 |
+
)
|
131 |
+
|
132 |
# Then release async lock if in multiprocess mode
|
133 |
if not self._is_async and self._async_lock is not None:
|
|
|
|
|
|
|
|
|
134 |
self._async_lock.release()
|
135 |
+
direct_log(
|
136 |
+
f"== Lock == Process {self._pid}: Async lock '{self._name}' released",
|
137 |
+
enable_output=self._enable_logging,
|
138 |
+
)
|
139 |
|
140 |
direct_log(
|
141 |
f"== Lock == Process {self._pid}: Lock '{self._name}' released (async={self._is_async})",
|