aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-02-23 18:46:44 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2015-02-23 18:46:44 -0800
commit2f5ae0b2e329ee78b940c7a25e7f45b3bb09d2cd (patch)
tree8315d20ffdfe2defd0c7135364eda21da207ed23 /lib
parentLeave a note about reindex. (diff)
downloadbackend-2f5ae0b2e329ee78b940c7a25e7f45b3bb09d2cd.tar.gz
backend-2f5ae0b2e329ee78b940c7a25e7f45b3bb09d2cd.tar.bz2
backend-2f5ae0b2e329ee78b940c7a25e7f45b3bb09d2cd.zip
Prepare real wait for status.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/storage.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/storage.rb b/lib/storage.rb
index 68de268..c054f9e 100644
--- a/lib/storage.rb
+++ b/lib/storage.rb
@@ -11,12 +11,6 @@ module Ag::Storage
end
def create_index(list)
- begin
- delete_index(ist)
- rescue Elasticsearch::Transport::Transport::Errors::NotFound => e
- $stderr.puts "Index did not exist yet. Creating." if $options.debug
- end
-
$es.indices.create(
index: 'ml-' + list,
body: {
@@ -93,6 +87,7 @@ module Ag::Storage
})
# Give elasticsearch some time to process the new index
+ puts $es.cluster.health
sleep 1
end