From c4c504d20e2998932514deffa2e573310eb2fdf6 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Mon, 23 Feb 2015 19:06:39 -0800 Subject: Work on better selection of status. Signed-off-by: Robin H. Johnson --- lib/storage.rb | 10 ++++++---- 1 file 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 -- cgit v1.2.3-65-gdbad