From 516776896f8f882f69303bfc6be02b9c76216c0e Mon Sep 17 00:00:00 2001 From: cryptorugmunch Date: Wed, 8 Jul 2026 07:30:04 +0200 Subject: [PATCH] fix(neo4j): use AsyncGraphDatabase for async session support --- app/core/neo4j_connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/neo4j_connection.py b/app/core/neo4j_connection.py index 597989d..77471bd 100644 --- a/app/core/neo4j_connection.py +++ b/app/core/neo4j_connection.py @@ -13,12 +13,12 @@ def _init() -> None: if _driver is not None: return try: - from neo4j import GraphDatabase, basic_auth + from neo4j import AsyncGraphDatabase, basic_auth uri = os.getenv("NEO4J_URI", "bolt://rmi-neo4j:7687") user = os.getenv("NEO4J_USER", "neo4j") password = os.getenv("NEO4J_PASSWORD", "password") - _driver = GraphDatabase.driver(uri, auth=basic_auth(user, password)) + _driver = AsyncGraphDatabase.driver(uri, auth=basic_auth(user, password)) log.info("neo4j_driver_connected") except Exception as exc: log.warning("neo4j_driver_init_failed err=%s", exc)