Skip to content

Instantly share code, notes, and snippets.

@tkaemming
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkaemming/21b26cee2788939399c4 to your computer and use it in GitHub Desktop.
Save tkaemming/21b26cee2788939399c4 to your computer and use it in GitHub Desktop.
zookeeper asynchronous child retrieval
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