Remove transactional delete
This just doesn't work due to the darn limit on recursive deletes in transactions.
This commit is contained in:
parent
8625e9bd3e
commit
d3b5b5236a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue