elasticsearch.rake revision 8805e95f224e27ed7063c7c6e41685422f1a052e
require 'elasticsearch/rails/tasks/import'
namespace :elasticsearch do
desc 'Wipe the Ontology Index from ElasticSearch'
task :wipe => [:environment] do
end
task :run_cluster do
ENV['TEST_CLUSTER_NODES'] ||= '1'
env_timeout = ENV['TEST_CLUSTER_TIMEOUT']
timeout = env_timeout && !env_timeout.empty? ? env_timeout.to_i : 120
Signal.trap('INT') do
Elasticsearch::Extensions::Test::Cluster.stop timeout: timeout
end
Elasticsearch::Extensions::Test::Cluster.start timeout: timeout
loop {}
end
end