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:
|
if type(keys) is not list:
|
||||||
keys = [keys]
|
keys = [keys]
|
||||||
|
|
||||||
transaction = self.zk_conn.transaction()
|
|
||||||
|
|
||||||
for key in keys:
|
for key in keys:
|
||||||
transaction.delete(key, recursive=recursive)
|
if self.exists(key):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
transaction.commit()
|
self.zk_conn.delete(key, recursive=recursive)
|
||||||
return True
|
|
||||||
except Exception as e:
|
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 False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def children(self, key):
|
def children(self, key):
|
||||||
"""
|
"""
|
||||||
Lists all children of a key
|
Lists all children of a key
|
||||||
|
|
Loading…
Reference in New Issue