commit:     c4c504d20e2998932514deffa2e573310eb2fdf6
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 24 03:06:39 2015 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Feb 24 03:06:39 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=c4c504d2

Work on better selection of status.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 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

Reply via email to