Class: Chef::Solr::Application::Rebuild
- Inherits:
-
Application
- Object
- Application
- Chef::Solr::Application::Rebuild
- Defined in:
- lib/chef/solr/application/rebuild.rb
Instance Method Summary collapse
-
#initialize ⇒ Rebuild
constructor
A new instance of Rebuild.
- #run_application ⇒ Object
- #setup_application ⇒ Object
Constructor Details
Instance Method Details
#run_application ⇒ Object
93 94 95 96 97 |
# File 'lib/chef/solr/application/rebuild.rb', line 93 def run_application s = Chef::Solr.new(Chef::Config[:solr_url]) Chef::Log.info("Destroying the index") s.rebuild_index end |
#setup_application ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/chef/solr/application/rebuild.rb', line 81 def setup_application Chef::Log.level = Chef::Config[:log_level] Chef::Log.warn("This operation is destructive!") Chef::Log.warn("I'm going to count to 10, and then delete your Solr index and rebuild it.") Chef::Log.warn("CTRL-C will, of course, stop this disaster.") 0.upto(10) do |num| Chef::Log.warn("... #{num}") sleep 1 end Chef::Log.warn("... Bombs away!") end |