groovy 清理redis-cluster
作者:互联网
目录
groovy 清理redis-cluster
def redisClusterIp="192.168.58.134"
def redisClusterPort=['7000','7001','7002']
def flushredisdb(redisClusterIp,redisClusterPort) {
for (redisPort in redisClusterPort) {
sh """
redis-cli -c -h ${redisClusterIp} -p ${redisPort} flushdb;
"""
}
}
标签:groovy,redisClusterIp,redis,cluster,redisClusterPort,def 来源: https://www.cnblogs.com/liwenchao1995/p/16696301.html