Single watch for multiple nodes can't detect node path
When I create a single watch for multiple nodes
input_items = zk.get_children( inputNode )
for item_id in input_items :
@zk.ChildrenWatch( '{}/{}'.format( inputNode, item_id ) )
def watch_item_children( items):
print items
my watch callback can't detect for which node it has been called. As I can see from sources of ChildrenWatch class there is path property but it isn't sent to watch callback as a parameter. I try to use send_event=True and get path from event param but it is set to None at first call So it will be great if you add additional flag for ChildrenWatch (send_path for example) to send path for watch callback
If proposed change to API is acceptable I can make push request with my patch for this solution
If the send_event is broken on first call, I'd prefer to fix that so it works properly, maybe that means we set the path there. That would be more consistent than adding more options. So rather than sending None as the event, we will make an Event object and send it in with the path.