Browse Source

doc: switch examples to Zake

This avoids having Zookeeper or memcached running, which might not be
the case.

Change-Id: Ib66eb8348aece447ee2c8de084c4ac807b552907
changes/07/135307/1
Julien Danjou 8 years ago
parent
commit
fd368a706b
  1. 2
      examples/coordinator.py
  2. 2
      examples/coordinator_heartbeat.py
  3. 2
      examples/group_membership.py
  4. 2
      examples/group_membership_watch.py
  5. 2
      examples/leader_election.py
  6. 2
      examples/lock.py

2
examples/coordinator.py

@ -1,5 +1,5 @@
from tooz import coordination
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
coordinator.stop()

2
examples/coordinator_heartbeat.py

@ -4,7 +4,7 @@ from tooz import coordination
ALIVE_TIME = 5
coordinator = coordination.get_coordinator('memcached://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
start = time.time()

2
examples/group_membership.py

@ -4,7 +4,7 @@ import six
from tooz import coordination
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
# Create a group

2
examples/group_membership_watch.py

@ -4,7 +4,7 @@ import six
from tooz import coordination
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
# Create a group

2
examples/leader_election.py

@ -6,7 +6,7 @@ import six
from tooz import coordination
ALIVE_TIME = 1
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
# Create a group

2
examples/lock.py

@ -1,6 +1,6 @@
from tooz import coordination
coordinator = coordination.get_coordinator('kazoo://localhost', b'host-1')
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
# Create a lock

Loading…
Cancel
Save