Closed DjangoPeng closed 7 years ago
I'm trying the watch method, but I found it can't watch the changes of a directory.
watch
etcd server:
localhost:2379
etcd directory tree:
/test/name /test/label
I created a python-etcd client and watched the /test/ directory.
/test/
import etcd client = etcd.Client(host="localhost", port=2379) client.watch("/test/") # client.watch("/test/*") # failed either in this way
Then I use the etcdctl to set a new key-value in /test/:
etcdctl
$ etcdctl set /test/watchme "hello watch" $ etcdctl get /test/watchme hello watch
It's obvious that I set a new key successfully, but the python-etcd client is still blocked util EtcdWatchTimeOut.
EtcdWatchTimeOut
What's wrong with my test, buddy?
I lost the recursive argument. Close this issue.
recursive
I'm trying the
watch
method, but I found it can't watch the changes of a directory.Environment
etcd server:
etcd directory tree:
I created a python-etcd client and watched the
/test/
directory.Then I use the
etcdctl
to set a new key-value in/test/
:It's obvious that I set a new key successfully, but the python-etcd client is still blocked util
EtcdWatchTimeOut
.What's wrong with my test, buddy?