Class: Chef::Solr::Application::Indexer

Inherits:
Application
  • Object
show all
Defined in:
lib/chef/solr/application/indexer.rb

Instance Method Summary collapse

Constructor Details

#initializeIndexer

Returns a new instance of Indexer.



129
130
131
132
133
134
# File 'lib/chef/solr/application/indexer.rb', line 129

def initialize
  super

  @index = Chef::Solr::Index.new
  @consumer = Chef::Solr::IndexQueueConsumer.new
end

Instance Method Details

#run_applicationObject



141
142
143
144
# File 'lib/chef/solr/application/indexer.rb', line 141

def run_application
  Chef::Daemon.daemonize("chef-solr-indexer") if Chef::Config[:daemonize]
  @consumer.start
end

#setup_applicationObject



136
137
138
139
# File 'lib/chef/solr/application/indexer.rb', line 136

def setup_application
  Chef::Daemon.change_privilege
  Chef::Log.level = Chef::Config[:log_level]
end