| skipped 1281 lines |
1282 | 1282 | | id += 1 |
1283 | 1283 | | |
1284 | 1284 | | #tx.process() |
1285 | | - | tx.commit() |
| 1285 | + | try: |
| 1286 | + | # for py2neo 2021.1 or later |
| 1287 | + | GRAPH.commit(tx) |
| 1288 | + | except: |
| 1289 | + | # for py2neo 2021.0 or earlier |
| 1290 | + | tx.commit() |
| 1291 | + | |
1286 | 1292 | | print("[+] Creation of a graph data finished.") |
1287 | 1293 | | |
1288 | 1294 | | # Parse from Elastic Search cluster |
| skipped 485 lines |
1774 | 1780 | | id += 1 |
1775 | 1781 | | |
1776 | 1782 | | #tx.process() |
1777 | | - | tx.commit() |
| 1783 | + | try: |
| 1784 | + | # for py2neo 2021.1 or later |
| 1785 | + | GRAPH.commit(tx) |
| 1786 | + | except: |
| 1787 | + | # for py2neo 2021.0 or earlier |
| 1788 | + | tx.commit() |
| 1789 | + | |
1778 | 1790 | | print("[+] Creation of a graph data finished.") |
1779 | 1791 | | |
1780 | 1792 | | def main(): |
| skipped 78 lines |