class ThinkingSphinx::Interfaces::Daemon

Public Instance Methods

start() click to toggle source
# File lib/thinking_sphinx/interfaces/daemon.rb, line 4
def start
  if running?
    raise ThinkingSphinx::SphinxAlreadyRunning, 'searchd is already running'
  end

  if options[:nodetach]
    ThinkingSphinx::Commands::StartAttached.call configuration, options
  else
    ThinkingSphinx::Commands::StartDetached.call configuration, options
  end
end
status() click to toggle source
# File lib/thinking_sphinx/interfaces/daemon.rb, line 16
def status
  if running?
    stream.puts "The Sphinx daemon searchd is currently running."
  else
    stream.puts "The Sphinx daemon searchd is not currently running."
  end
end
stop() click to toggle source
# File lib/thinking_sphinx/interfaces/daemon.rb, line 24
def stop
  ThinkingSphinx::Commands::Stop.call configuration, options
end