mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
redis-trib import: trap MIGRATE errors.
This commit is contained in:
parent
939c586ef7
commit
715a6d3a78
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user