提交 34b68b7e 编写于 作者: A antirez

redis-trib import: trap MIGRATE errors.

上级 bdfa26fb
......@@ -1023,8 +1023,15 @@ class RedisTrib
# Migrate keys using the MIGRATE command.
slot = key_to_slot(k)
target = slots[slot]
puts "Migrating #{k} to #{target}"
source.client.call(["migrate",target.info[:host],target.info[:port],k,0,15000])
print "Migrating #{k} to #{target}: "
STDOUT.flush
begin
source.client.call(["migrate",target.info[:host],target.info[:port],k,0,15000])
rescue => e
puts e
else
puts "OK"
end
}
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册