From f81aeff0096664a7556d451056f813e4994ab2d2 Mon Sep 17 00:00:00 2001 From: Andrej Milicevic Date: Mon, 13 Oct 2025 12:50:26 +0200 Subject: [PATCH] Revert "fix: Revert changes made to sql alchemy adapter for lib test" This reverts commit ef5965224ac49df72a21e56d9b0537df73ef6a37. --- .../databases/relational/sqlalchemy/SqlAlchemyAdapter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py b/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py index 88d2abc7e..36ba90db5 100644 --- a/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py +++ b/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py @@ -507,7 +507,10 @@ class SQLAlchemyAdapter: if self.engine.dialect.name == "sqlite": await self.engine.dispose(close=True) # Wait for the database connections to close and release the file (Windows) - await asyncio.sleep(2) + import gc + + gc.collect() + # await asyncio.sleep(2) db_directory = path.dirname(self.db_path) file_name = path.basename(self.db_path) file_storage = get_file_storage(db_directory)