Skip to content

Instantly share code, notes, and snippets.

@ton31337
Created July 3, 2015 09:03
Show Gist options
  • Save ton31337/0aae0e34e2dfffee31c9 to your computer and use it in GitHub Desktop.
Save ton31337/0aae0e34e2dfffee31c9 to your computer and use it in GitHub Desktop.
path = '/kazkas6'
zk.register(path) do |event|
if event.node_changed? or event.node_created?
data = zk.get(path, watch: true).first
print data
end
end
zk.set(path, 'b')
zk.set(path, 'a')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment