redis-trib import: trap MIGRATE errors.

This commit is contained in:
antirez 2014-05-12 10:36:33 +02:00
parent 939c586ef7
commit 715a6d3a78

View File

@ -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