예제 #1
0
파일: ephemeral.py 프로젝트: shaitan/burlak
def create(path):
    unicorn = Service('unicorn')

    print 'creating node {}'.format(path)

    ch = yield unicorn.create_with(path, {}, dict(ephemeral=True))
    # ch = yield unicorn.create(path, {})
    _ = yield ch.rx.get()

    print 'creating done'
    yield gen.sleep(10)

    print 'node should be removed {}'.format(path)

    yield ch.tx.close()