aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-02-23 19:06:39 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2015-02-23 19:06:39 -0800
commitc4c504d20e2998932514deffa2e573310eb2fdf6 (patch)
tree4a8908cd22d5a78c9c94603149fc9de5a78432c2
parentWe do not want to catch NoMethodError from deeper in the stack. (diff)
downloadbackend-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.rb10
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