groovy 脚本实例 清理redis-cluster
groovy 脚本实例 清理redis-cluster
清理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;
"""
}
}
本文来自博客园,作者:liwenchao1995,转载请注明原文链接:https://www.cnblogs.com/liwenchao1995/p/16696301.html