#NEWLINE# def makeService( config , dispatcher ) : #NEWLINE# #INDENT# '\n    Set up Redis client services.\n    ' #NEWLINE# s = service . MultiService ( ) #NEWLINE# factories = [ ] #NEWLINE# for host in config [ 'redis-hosts' ] : #NEWLINE# #INDENT# factory = RedisClientFactory ( ) #NEWLINE# factories . append ( factory ) #NEWLINE# tcpClient = internet . TCPClient ( host , config [ 'redis-port' ] , factory ) #NEWLINE# tcpClient . setServiceParent ( s ) #NEWLINE# #UNINDENT# client = RedisPushMultiClient ( factories ) #NEWLINE# publisher = RedisPublisher ( dispatcher , client , config [ 'redis-key' ] ) #NEWLINE# publisher . setServiceParent ( s ) #NEWLINE# return host