Remove transactional delete

This just doesn't work due to the darn limit on recursive deletes in
transactions.
This commit is contained in:
Joshua Boniface 2021-05-31 19:22:01 -04:00
parent 8625e9bd3e
commit d3b5b5236a
1 changed files with 7 additions and 9 deletions

View File

@ -218,18 +218,16 @@ class ZKHandler(object):
if type(keys) is not list:
keys = [keys]
transaction = self.zk_conn.transaction()
for key in keys:
transaction.delete(key, recursive=recursive)
if self.exists(key):
try:
transaction.commit()
return True
self.zk_conn.delete(key, recursive=recursive)
except Exception as e:
self.log("ZKHandler error: Failed to commit transaction: {}".format(e), state='e')
self.log("ZKHandler error: Failed to delete key {}: {}".format(key, e), state='e')
return False
return True
def children(self, key):
"""
Lists all children of a key