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

Work on getting state.

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

---
 lib/storage.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/storage.rb b/lib/storage.rb
index f47c6bc..081e206 100644
--- a/lib/storage.rb
+++ b/lib/storage.rb
@@ -89,7 +89,10 @@ module Ag::Storage
       })
 
     # Give elasticsearch some time to process the new index
-    pp $es.indices.status(index: indexname)
+       status = $es.indices.status(index: indexname)
+    pp status['indices'][indexname]['shares'].map do |k,v|
+               v['routing']['state']
+       end
     while $es.cluster.health['status'] != 'green' do
                pp $es.indices.status(index: indexname)
         sleep 0.01

Reply via email to