环境的是python3 / pip3
import sys
import redis
# 迁移hash
def moveHash(cursor):
cursor, data = r.hscan...print(cursor, "批处理")
moveHash(cursor)
else:
print(cursor, "处理完成了")
# 迁移...list
def moveList():
length = r.llen(key)
if length == 0:
print(key, "---list迁移结束---剩余长度...r = redis.Redis(host=ip1, password=password1, port=6379, db=0,
decode_responses=True...)
# 连接redis 带接收的库
rNew = redis.Redis(host=ip2, password=password2, port=6379, db=0,