Skip to content

Commit

Permalink
FIx for running SPADE scripts against pgdb utility
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Nov 14, 2019
1 parent 229ff3e commit eb71d6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions polyglotdb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ def ensure_local_database_running(database_name, port=8080, token=None, ip="loca
host = 'http://{}:{}'.format(ip, port)
client = PGDBClient(host, token=token)

databases = client.list_databases()

try:
response = client.create_database(database_name)
except (ClientError, ConnectionError):
pass

try:
client.start_database(database_name)
except (ClientError, ConnectionError):
Expand All @@ -68,7 +67,7 @@ def ensure_local_database_running(database_name, port=8080, token=None, ip="loca
db_info['host'] = ip
pgdb = False
except ConnectionError:
print('Warning: no Polyglot server available locally, using default ports.')
print('Warning: no ISCAN server available locally, using default ports.')
db_info = {'graph_http_port': 7474, 'graph_bolt_port': 7687,
'acoustic_http_port': 8086, 'host': ip}
pgdb = True
Expand Down

0 comments on commit eb71d6e

Please sign in to comment.