Commit 715a6d3a authored by antirez's avatar antirez
Browse files

redis-trib import: trap MIGRATE errors.

parent 939c586e
...@@ -1023,8 +1023,15 @@ class RedisTrib ...@@ -1023,8 +1023,15 @@ class RedisTrib
# Migrate keys using the MIGRATE command. # Migrate keys using the MIGRATE command.
slot = key_to_slot(k) slot = key_to_slot(k)
target = slots[slot] target = slots[slot]
puts "Migrating #{k} to #{target}" print "Migrating #{k} to #{target}: "
source.client.call(["migrate",target.info[:host],target.info[:port],k,0,15000]) 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
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment