From 57439ae8dff81e145c688614d81a66a34a269cfa Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:40:30 +0200 Subject: [PATCH] testing on demand connection with ci/cd --- cognee/infrastructure/databases/graph/kuzu/adapter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cognee/infrastructure/databases/graph/kuzu/adapter.py b/cognee/infrastructure/databases/graph/kuzu/adapter.py index 4d6db2165..b67502cd3 100644 --- a/cognee/infrastructure/databases/graph/kuzu/adapter.py +++ b/cognee/infrastructure/databases/graph/kuzu/adapter.py @@ -28,7 +28,7 @@ from cognee.infrastructure.databases.cache.config import get_cache_config logger = get_logger() cache_config = get_cache_config() -if cache_config.caching: +if not cache_config.caching: from cognee.infrastructure.databases.cache.get_cache_engine import get_cache_engine @@ -49,7 +49,7 @@ class KuzuAdapter(GraphDBInterface): self.db_path = db_path # Path for the database directory self.db: Optional[Database] = None self.connection: Optional[Connection] = None - if cache_config.caching: + if not cache_config.caching: self.executor = ThreadPoolExecutor(max_workers=1) self.redis_lock = get_cache_engine( lock_key="kuzu-lock-" + str(uuid5(NAMESPACE_OID, db_path)) @@ -244,7 +244,7 @@ class KuzuAdapter(GraphDBInterface): logger.error(f"Query execution failed: {str(e)}") raise - if cache_config.caching: + if not cache_config.caching: async with self._connection_change_lock: self.open_connections += 1 if self._is_closed: