def get_redis_connection(server_name='default'):
 global connection_pool
 if (connection_pool is None):
  connection_pool = setup_redis()
 pool = connection_pool[server_name]
 return redis.StrictRedis(connection_pool=pool)

def get_redis_connection ( server_name = 'default' ) : global connection_pool if ( connection_pool is None ) : connection_pool = setup_redis ( ) pool = connection_pool [ server_name ] return redis . StrictRedis ( connection_pool = pool )
gets the specified redis connection .