diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-02-23 19:06:39 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-02-23 19:06:39 -0800 |
commit | c4c504d20e2998932514deffa2e573310eb2fdf6 (patch) | |
tree | 4a8908cd22d5a78c9c94603149fc9de5a78432c2 | |
parent | We do not want to catch NoMethodError from deeper in the stack. (diff) | |
download | backend-c4c504d20e2998932514deffa2e573310eb2fdf6.tar.gz backend-c4c504d20e2998932514deffa2e573310eb2fdf6.tar.bz2 backend-c4c504d20e2998932514deffa2e573310eb2fdf6.zip |
Work on better selection of status.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | lib/storage.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/storage.rb b/lib/storage.rb index e9aea92..7cba45c 100644 --- a/lib/storage.rb +++ b/lib/storage.rb @@ -89,10 +89,12 @@ module Ag::Storage }) # Give elasticsearch some time to process the new index - status = $es.indices.status(index: indexname) - pp status['indices'][indexname]['shares'].map do |k,v| - v['routing']['state'] - end + status = $es.indices.status(index: indexname) + pp status + status = status['indices'][indexname]['shards'].map do |k,v| + v['routing']['state'] + end + pp status while $es.cluster.health['status'] != 'green' do pp $es.indices.status(index: indexname) sleep 0.01 |