def makeService(config, dispatcher):
    s = service.MultiService()

    factories = []

    for host in config['redis-hosts']:
        factory = RedisClientFactory()
        factories.append(factory)
        tcpClient = internet.TCPClient(host,
                                       config['redis-port'],
                                       factory)
        tcpClient.setServiceParent(s)

    client = RedisPushMultiClient(factories)

    publisher = RedisPublisher(dispatcher, client, config['redis-key'])
    publisher.setServiceParent(s)

    return s
Copy an existing file.
dataset/ETHPy150Open mochi/udplog/udplog/redis.py/makeService--crossover with--dataset/ETHPy150Open unlimitedlabs/orchestra/orchestra/google_apps/service.py/Service.copy_file