Sha256: 437c3a220211be589d0cb5c75eda9300148fc5c7d8bb91197a81fe50573824d6

Contents?: true

Size: 427 Bytes

Versions: 3

Compression:

Stored size: 427 Bytes

Contents

class ThinkingSphinx::Commands::StartAttached < ThinkingSphinx::Commands::Base
  def call
    FileUtils.mkdir_p configuration.indices_location

    unless pid = fork
      controller.start :verbose => options[:verbose], :nodetach => true
    end

    Signal.trap('TERM') { Process.kill(:TERM, pid) }
    Signal.trap('INT')  { Process.kill(:TERM, pid) }

    Process.wait(pid)
  end

  private

  def type
    'start'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 lib/thinking_sphinx/commands/start_attached.rb
thinking-sphinx-3.4.1 lib/thinking_sphinx/commands/start_attached.rb
thinking-sphinx-3.4.0 lib/thinking_sphinx/commands/start_attached.rb