From deb9bef1cc1fa29db8de71a51c43ab76af755fc3 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Wed, 15 Oct 2025 10:58:30 +0700 Subject: [PATCH] Fix dependency issue --- analysis/concurrent_knowledge.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/analysis/concurrent_knowledge.py b/analysis/concurrent_knowledge.py index ee993a0..6e14456 100644 --- a/analysis/concurrent_knowledge.py +++ b/analysis/concurrent_knowledge.py @@ -50,10 +50,11 @@ def _acquire_lock(self, timeout: float = 10.0) -> Any: try: portalocker.lock(lock_file, portalocker.LOCK_EX | portalocker.LOCK_NB) return lock_file - except OSError: + except (OSError, portalocker.exceptions.LockException) as exc: + # Retry until timeout to handle concurrent access across processes if time.time() - start_time > timeout: lock_file.close() - raise TimeoutError(f"Lock timeout: {self.file_path}") + raise TimeoutError(f"Lock timeout: {self.file_path}") from exc time.sleep(0.05) def _release_lock(self, lock_file: Any):