Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1.     def connect_graph(db_username, db_password):
  2.         """
  3.        Retry the graph connection until it goes through
  4.        :param db_username:
  5.        :param db_password:
  6.        """
  7.         try:
  8.             return GraphDatabase.driver(connection_url,
  9.                                  auth=basic_auth(
  10.                                      db_username,
  11.                                      db_password
  12.                                     )
  13.                                  )
  14.         except ConnectionResetError:
  15.             time.sleep(1)
  16.             return connect_graph(db_username, db_password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement