aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-02-23 19:16:51 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2015-02-23 19:16:51 -0800
commite4394a608a896073bf0bf13483436e3cc04be5ee (patch)
treef75483bf921b9a30ce5edee083a7320f4dd1e326 /lib
parentKey hell. (diff)
downloadbackend-e4394a608a896073bf0bf13483436e3cc04be5ee.tar.gz
backend-e4394a608a896073bf0bf13483436e3cc04be5ee.tar.bz2
backend-e4394a608a896073bf0bf13483436e3cc04be5ee.zip
Work on the index.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/storage.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/storage.rb b/lib/storage.rb
index 29311ad..6e41ed7 100644
--- a/lib/storage.rb
+++ b/lib/storage.rb
@@ -89,17 +89,17 @@ module Ag::Storage
})
# Give elasticsearch some time to process the new index
- status = $es.indices.status(index: indexname)
- pp status
- pp status['indices'][indexname]['shards']
- status = status['indices'][indexname]['shards'].map do |k,v|
- v[0]['routing']['state']
- end
- pp status
while $es.cluster.health['status'] != 'green' do
- pp $es.indices.status(index: indexname)
- sleep 0.01
+ status = $es.indices.status(index: indexname)
+ pp status
+ pp status['indices'][indexname]['shards']
+ status = status['indices'][indexname]['shards'].map do |k,v|
+ v[0]['routing']['state']
+ end
+ pp status
+ sleep 0.01
end
+ pp $es.indices.status(index: indexname)
end
def get_content(message, filename)