Class: RtSphinx::Manager
- Inherits:
-
Object
- Object
- RtSphinx::Manager
- Defined in:
- lib/rt_sphinx/manager.rb
Class Method Summary collapse
Class Method Details
.kill_daemon_if_needed ⇒ Object
11 12 13 14 |
# File 'lib/rt_sphinx/manager.rb', line 11 def self.kill_daemon_if_needed `pid=$(lsof -i :9327 -t); if [ $pid ] ; then kill -TERM $pid || kill -KILL $pid; fi;` sleep(1) end |
.start ⇒ Object
5 6 7 8 9 |
# File 'lib/rt_sphinx/manager.rb', line 5 def self.start conf_file_path = File.join(File.('../../..', __FILE__), 'sphinx.conf') kill_daemon_if_needed puts `searchd --config #{conf_file_path}` end |