(graph)
| 64 | |
| 65 | # wait for all graph indices to by operational |
| 66 | def wait_for_indices_to_sync(graph): |
| 67 | q = "CALL db.indexes() YIELD status WHERE status <> 'OPERATIONAL' RETURN count(1)" |
| 68 | while True: |
| 69 | result = graph.query(q, read_only=True) |
| 70 | if result.result_set[0][0] == 0: |
| 71 | break |
| 72 | time.sleep(0.5) # sleep 500ms |
| 73 |