def f(): io = IOLoop.current() storage = Service("storage", endpoints=[["localhost", 10053]], io_loop=io) channel = yield storage.find('app', ['apps']) app_list = yield channel.rx.get() assert isinstance(app_list, list) raise gen.Return("OK")
def main(): storage = Service("storage", endpoints=[["localhost", 10053]], io_loop=io) channel = yield storage.find('app', ['apps']) res = yield channel.rx.get() raise gen.Return(res)
def test_service_with_seed(): io = IOLoop.current() n1 = Service("storage", seed="TEST_SEED") channel = io.run_sync(lambda: n1.find('app', ['apps'])) app_list = io.run_sync(channel.rx.get) assert isinstance(app_list, list)