Class: RtSphinx::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/rt_sphinx/manager.rb

Class Method Summary collapse

Class Method Details

.startObject



5
6
7
8
# File 'lib/rt_sphinx/manager.rb', line 5

def self.start
  stop
  puts `searchd --config ./sphinx.conf`
end

.stopObject



10
11
12
13
# File 'lib/rt_sphinx/manager.rb', line 10

def self.stop
  `pid=$(lsof -i :9327 -t); if [ $pid ] ; then kill -TERM $pid || kill -KILL $pid; fi;`
  sleep(1)
end