Skip to content

Commit

Permalink
adding bolt port as separate env var from http port
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDietzMorris committed Aug 29, 2023
1 parent d76594b commit a08f097
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PLATER/services/util/api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@

def get_graph_interface():
"""Get graph interface."""
neo4j_protocol = config.get('NEO4J_CONNECTION_PROTOCOL', 'bolt')
return GraphInterface(
host=config.get('NEO4J_HOST'),
port=config.get('NEO4J_HTTP_PORT'),
port=config.get('NEO4J_HTTP_PORT') if neo4j_protocol == 'http' else config.get('NEO4J_BOLT_PORT'),
auth=(
config.get('NEO4J_USERNAME'),
config.get('NEO4J_PASSWORD')
),
query_timeout=int(config.get('NEO4J_QUERY_TIMEOUT')),
protocol=config.get('NEO4J_CONNECTION_PROTOCOL', 'bolt'),
protocol=neo4j_protocol,
bl_version=config.get('BL_VERSION')
)

Expand Down

0 comments on commit a08f097

Please sign in to comment.