def main(): args = parse_arguments() client = Client(args.server, args.db) for response in client.job('.'.join([args.server, args.function]), repeat(b' a message', 10), messages=10): print(response)
from pylm.clients import Client from itertools import repeat client = Client('my_server', 'tcp://127.0.0.1:5555', sub_address='tcp://127.0.0.1:5581') if __name__ == '__main__': for response in client.job( ['my_server.foo', 'my_pipeline.foo', 'my_sink.foo'], repeat(b'a message', 10), messages=10): print('Client got: ', response)
from pylm.clients import Client from itertools import repeat client = Client('server', 'tcp://127.0.0.1:5559') if __name__ == '__main__': for response in client.job('server.foo', repeat(b'a message', 10), messages=10): print(response)
def client_job(): client = Client('master', db_address, session=None) return [r for r in client.job('master.something', [b'1'], messages=1)]