lib/thinking_sphinx/commands/stop.rb in thinking-sphinx-3.4.2 vs lib/thinking_sphinx/commands/stop.rb in thinking-sphinx-4.0.0
- old
+ new
@@ -1,13 +1,15 @@
+# frozen_string_literal: true
+
class ThinkingSphinx::Commands::Stop < ThinkingSphinx::Commands::Base
def call
- unless controller.running?
+ unless command :running
log 'searchd is not currently running.'
return
end
pid = controller.pid
- until !controller.running? do
+ until !command :running do
controller.stop options
sleep(0.5)
end
log "Stopped searchd daemon (pid: #{pid})."