mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +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.
|
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user