Skip to content

Commit

Permalink
fix: avoid using a closed neo4j driver!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed May 22, 2024
1 parent e56e677 commit 9961848
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tc_neo4j_lib/neo4j_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def _neo4j_database_connect(self) -> None:
auth = creds["auth"]
self.db_name = creds["db_name"]

with GraphDatabase.driver(url, auth=auth, database=self.db_name) as driver:
driver.verify_connectivity()

self.neo4j_driver = driver
self.neo4j_driver = GraphDatabase.driver(url, auth=auth, database=self.db_name)
self.gds = GraphDataScience(url, auth)

def _run_query(self, tx: Transaction, query: str, **kwargs) -> None:
Expand Down

0 comments on commit 9961848

Please sign in to comment.