Sha256: 1c6cc4d06e25a10d3ec128320f0634b217a6ed3cd6eeeb6e1fe85e8e983c8926
Contents?: true
Size: 632 Bytes
Versions: 17
Compression:
Stored size: 632 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::Deltas::DeleteJob def initialize(index_name, document_id) @index_name, @document_id = index_name, document_id end def perform return if @document_id.nil? ThinkingSphinx::Logger.log :query, statement do ThinkingSphinx::Connection.take do |connection| connection.execute statement end end rescue ThinkingSphinx::ConnectionError => error # This isn't vital, so don't raise the error. end private def statement @statement ||= Riddle::Query.update( @index_name, @document_id, :sphinx_deleted => true ) end end
Version data entries
17 entries across 17 versions & 1 rubygems