Class: ThinkingSphinx::Commands::Stop

Inherits:
Base
  • Object
show all
Defined in:
lib/thinking_sphinx/commands/stop.rb

Instance Method Summary collapse

Methods inherited from Base

call, #call_with_handling

Methods included from WithOutput

#initialize

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/thinking_sphinx/commands/stop.rb', line 4

def call
  unless command :running
    log 'searchd is not currently running.'
    return
  end

  pid = controller.pid
  until !command :running do
    controller.stop options
    sleep(0.5)
  end

  log "Stopped searchd daemon (pid: #{pid})."
end