Sha256: aec51001e571e331778ec964cb265c9c0e800d256be594b84f407b502cc5bf2d

Contents?: true

Size: 508 Bytes

Versions: 5

Compression:

Stored size: 508 Bytes

Contents

class ThinkingSphinx::Deltas::DeleteJob
  def initialize(indices, document_id)
    @indices, @document_id = indices, document_id
  end

  def perform
    ThinkingSphinx::Connection.take do |client|
      @indices.each do |index|
        client.update(index, ['sphinx_deleted'], {@document_id => [1]})
      end
    end
  rescue Riddle::ConnectionError, Riddle::ResponseError,
    ThinkingSphinx::SphinxError, Errno::ETIMEDOUT, Timeout::Error
    # Not the end of the world if Sphinx isn't running.
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
friendlyfashion-thinking-sphinx-2.0.14.4 lib/thinking_sphinx/deltas/delete_job.rb
friendlyfashion-thinking-sphinx-2.0.14.3 lib/thinking_sphinx/deltas/delete_job.rb
thinking-sphinx-2.1.0 lib/thinking_sphinx/deltas/delete_job.rb
thinking-sphinx-1.5.0 lib/thinking_sphinx/deltas/delete_job.rb
friendlyfashion-thinking-sphinx-2.0.14.2 lib/thinking_sphinx/deltas/delete_job.rb