From e912b6f37edfaefb711027035c66ed256041588b Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Tue, 19 Aug 2025 11:27:30 +0100 Subject: [PATCH] fix: ensure connection check before executing checkpoint in KuzuAdapter --- cognee/infrastructure/databases/graph/kuzu/adapter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cognee/infrastructure/databases/graph/kuzu/adapter.py b/cognee/infrastructure/databases/graph/kuzu/adapter.py index 1bafb3754..d3a3acb57 100644 --- a/cognee/infrastructure/databases/graph/kuzu/adapter.py +++ b/cognee/infrastructure/databases/graph/kuzu/adapter.py @@ -138,8 +138,9 @@ class KuzuAdapter(GraphDBInterface): s3_file_storage = S3FileStorage("") - async with self.KUZU_ASYNC_LOCK: - self.connection.execute("CHECKPOINT;") + if self.connection: + async with self.KUZU_ASYNC_LOCK: + self.connection.execute("CHECKPOINT;") s3_file_storage.s3.put(self.temp_graph_file, self.db_path, recursive=True)