Sha256: 19debf987ba0b917862eef33679ce5e544efec37263664755fe5d2ce05018fff

Contents?: true

Size: 708 Bytes

Versions: 20

Compression:

Stored size: 708 Bytes

Contents

require 'delayed/job'

require 'thinking_sphinx/deltas/delayed_delta/delta_job'
require 'thinking_sphinx/deltas/delayed_delta/flag_as_deleted_job'
require 'thinking_sphinx/deltas/delayed_delta/job'

module ThinkingSphinx
  module Deltas
    class DelayedDelta < ThinkingSphinx::Deltas::DefaultDelta
      def index(model, instance = nil)
        ThinkingSphinx::Deltas::Job.enqueue(
          ThinkingSphinx::Deltas::DeltaJob.new(delta_index_name(model))
        )
        
        Delayed::Job.enqueue(
          ThinkingSphinx::Deltas::FlagAsDeletedJob.new(
            core_index_name(model), instance.sphinx_document_id
          )
        ) if instance
        
        true
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
DrMark-thinking-sphinx-1.1.6 lib/thinking_sphinx/deltas/delayed_delta.rb
dpickett-thinking-sphinx-1.1.4 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.0 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.1 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.10 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.2 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.3 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.4 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.5 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.6 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.7 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.8 lib/thinking_sphinx/deltas/delayed_delta.rb
freelancing-god-thinking-sphinx-1.1.9 lib/thinking_sphinx/deltas/delayed_delta.rb
lostboy-thinking-sphinx-1.1.5.1 lib/thinking_sphinx/deltas/delayed_delta.rb
lostboy-thinking-sphinx-1.1.5.2 lib/thinking_sphinx/deltas/delayed_delta.rb
lostboy-thinking-sphinx-1.1.5.3 lib/thinking_sphinx/deltas/delayed_delta.rb
lostboy-thinking-sphinx-1.1.5.4 lib/thinking_sphinx/deltas/delayed_delta.rb
lostboy-thinking-sphinx-1.1.5.5 lib/thinking_sphinx/deltas/delayed_delta.rb
pixeltrix-thinking-sphinx-1.1.5 lib/thinking_sphinx/deltas/delayed_delta.rb
sherpa99-thinking-sphinx-1.1.4 lib/thinking_sphinx/deltas/delayed_delta.rb