Sha256: 3ac0297873a4aa26ab51cfe034d96ccc6706875e083a61675739616b1f6cc8c3
Contents?: true
Size: 602 Bytes
Versions: 69
Compression:
Stored size: 602 Bytes
Contents
module ThinkingSphinx module Deltas class Job < Delayed::Job def self.enqueue(object, priority = 0) super unless duplicates_exist(object) end def self.cancel_thinking_sphinx_jobs if connection.tables.include?("delayed_jobs") delete_all("handler LIKE '--- !ruby/object:ThinkingSphinx::Deltas::%'") end end private def self.duplicates_exist(object) count( :conditions => { :handler => object.to_yaml, :locked_at => nil } ) > 0 end end end end
Version data entries
69 entries across 69 versions & 15 rubygems