@@ -203,7 +203,6 @@ def _publish_node(self, node_file):
203203 # If label is seen for the first time, try creating unique index
204204 if label not in self .labels :
205205 tx .commit () # Transaction needs to be committed as index update will make transaction to abort.
206- tx .close ()
207206 LOGGER .info ('Committed {} records' .format (count + 1 ))
208207
209208 self ._try_create_index (label )
@@ -214,7 +213,6 @@ def _publish_node(self, node_file):
214213 tx = self ._execute_statement (stmt , tx , count )
215214
216215 tx .commit ()
217- tx .close ()
218216 LOGGER .info ('Committed {} records' .format (count + 1 ))
219217
220218 def is_create_only_node (self , node_record ):
@@ -271,7 +269,6 @@ def _publish_relation(self, relation_file):
271269 expect_result = self ._confirm_rel_created )
272270
273271 tx .commit ()
274- tx .close ()
275272 LOGGER .info ('Committed {} records' .format (count + 1 ))
276273
277274 def create_relationship_merge_statement (self , rel_record ):
@@ -369,7 +366,6 @@ def _execute_statement(self,
369366
370367 if count > 1 and count % self ._transaction_size == 0 :
371368 tx .commit ()
372- tx .close ()
373369 LOGGER .info ('Committed {} records so far' .format (count ))
374370 return self ._session .begin_transaction ()
375371
0 commit comments