fd368a706b
This avoids having Zookeeper or memcached running, which might not be the case. Change-Id: Ib66eb8348aece447ee2c8de084c4ac807b552907
20 lines
374 B
Python
20 lines
374 B
Python
import uuid
|
|
|
|
import six
|
|
|
|
from tooz import coordination
|
|
|
|
coordinator = coordination.get_coordinator('zake://', b'host-1')
|
|
coordinator.start()
|
|
|
|
# Create a group
|
|
group = six.binary_type(six.text_type(uuid.uuid4()).encode('ascii'))
|
|
request = coordinator.create_group(group)
|
|
request.get()
|
|
|
|
# Join a group
|
|
request = coordinator.join_group(group)
|
|
request.get()
|
|
|
|
coordinator.stop()
|