diff options
author | antirez <antirez@gmail.com> | 2014-05-12 10:36:33 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-12 10:36:33 +0200 |
commit | 715a6d3a7824b7c1cd1902be800b5aa8b638aa76 (patch) | |
tree | 73f06d0da57b260ae9cff29f2daf4bf342fa97e5 /src/redis-trib.rb | |
parent | 939c586ef74bbfbaa5fa88b270734a9332d7ca63 (diff) | |
download | redis-715a6d3a7824b7c1cd1902be800b5aa8b638aa76.tar.gz |
redis-trib import: trap MIGRATE errors.
Diffstat (limited to 'src/redis-trib.rb')
-rwxr-xr-x | src/redis-trib.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/redis-trib.rb b/src/redis-trib.rb index b6f6aba39..92663eda8 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -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 |