Class: ThinkingSphinx::Deltas::Job

Inherits:
Delayed::Job
  • Object
show all
Defined in:
lib/thinking_sphinx/deltas/delayed_delta/job.rb

Class Method Summary collapse

Class Method Details

.cancel_thinking_sphinx_jobsObject



8
9
10
11
12
# File 'lib/thinking_sphinx/deltas/delayed_delta/job.rb', line 8

def self.cancel_thinking_sphinx_jobs
  if connection.tables.include?("delayed_jobs")
    delete_all("handler LIKE '--- !ruby/object:ThinkingSphinx::Deltas::%'")
  end
end

.enqueue(object, priority = 0) ⇒ Object



4
5
6
# File 'lib/thinking_sphinx/deltas/delayed_delta/job.rb', line 4

def self.enqueue(object, priority = 0)
  super unless duplicates_exist(object)
end