Last active
August 29, 2015 14:11
-
-
Save tkaemming/21b26cee2788939399c4 to your computer and use it in GitHub Desktop.
zookeeper asynchronous child retrieval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def children(zookeeper, path): | |
get_child_path = functools.partial(posixpath.join, path) | |
return [ | |
(name, zookeeper.get_async(get_child_path(name))) | |
for name in zookeeper.get_children(path) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment