Sha256: c237885b0a6465fc198b6b2ff8f3d0728c8487d7d9475a200de4eefb6774761d

Contents?: true

Size: 483 Bytes

Versions: 14

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

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

    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

14 entries across 14 versions & 1 rubygems

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