Class: ThinkingSphinx::Interfaces::Daemon
- Defined in:
- lib/thinking_sphinx/interfaces/daemon.rb
Instance Method Summary collapse
Methods included from WithOutput
Instance Method Details
#start ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/thinking_sphinx/interfaces/daemon.rb', line 4 def start if command :running raise ThinkingSphinx::SphinxAlreadyRunning, 'searchd is already running' end command([:nodetach] ? :start_attached : :start_detached) end |
#status ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/thinking_sphinx/interfaces/daemon.rb', line 12 def status if command :running stream.puts "The Sphinx daemon searchd is currently running." else stream.puts "The Sphinx daemon searchd is not currently running." end end |
#stop ⇒ Object
20 21 22 |
# File 'lib/thinking_sphinx/interfaces/daemon.rb', line 20 def stop command :stop end |