Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def connect_graph(db_username, db_password):
- """
- Retry the graph connection until it goes through
- :param db_username:
- :param db_password:
- """
- try:
- return GraphDatabase.driver(connection_url,
- auth=basic_auth(
- db_username,
- db_password
- )
- )
- except ConnectionResetError:
- time.sleep(1)
- return connect_graph(db_username, db_password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement