Sha256: 326c0b22b7d25043a368e53f737d5642f8f74214c129c561b11cb32960dee332

Contents?: true

Size: 418 Bytes

Versions: 17

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

class ThinkingSphinx::Commands::Stop < ThinkingSphinx::Commands::Base
  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

  private

  def type
    'stop'
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.5.1 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.5.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.4.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.3.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.2.1 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.2.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.1.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-5.0.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.4.1 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.4.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.3.2 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.3.1 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.3.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.2.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.1.0 lib/thinking_sphinx/commands/stop.rb
thinking-sphinx-4.0.0 lib/thinking_sphinx/commands/stop.rb