Skip to content

Commit

Permalink
Merge pull request #80 from VirtualFlyBrain/Defaulting2V4
Browse files Browse the repository at this point in the history
Defaulting to Neo4j V4 and falling back to v3.
  • Loading branch information
Robbie1977 authored May 30, 2022
2 parents d7c71ab + 1b642df commit 2403d44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vfb_connect/neo/neo4j_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def __init__(self, endpoint = get_default_servers()['neo_endpoint'],
self.base_uri = endpoint
self.usr = usr
self.pwd = pwd
self.commit = "/db/data/transaction/commit"
self.headers = {}
self.commit = "/db/neo4j/tx/commit"
self.headers = {'Content-type': 'application/json'}
if not self.test_connection():
print("Connecting to Neo4j v4+")
self.commit = "/db/neo4j/tx/commit"
self.headers = {'Content-type': 'application/json'}
print("Falling back to Neo4j v3 connection")
self.commit = "/db/data/transaction/commit"
self.headers = {}
self.test_connection()

def commit_list(self, statements, return_graphs=False):
Expand Down

0 comments on commit 2403d44

Please sign in to comment.