Class: ThinkingSphinx::Deltas::DeleteJob
- Inherits:
-
Object
- Object
- ThinkingSphinx::Deltas::DeleteJob
- Defined in:
- lib/thinking_sphinx/deltas/delete_job.rb
Instance Method Summary collapse
-
#initialize(index_name, document_id) ⇒ DeleteJob
constructor
A new instance of DeleteJob.
- #perform ⇒ Object
Constructor Details
#initialize(index_name, document_id) ⇒ DeleteJob
Returns a new instance of DeleteJob.
4 5 6 |
# File 'lib/thinking_sphinx/deltas/delete_job.rb', line 4 def initialize(index_name, document_id) @index_name, @document_id = index_name, document_id end |
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/thinking_sphinx/deltas/delete_job.rb', line 8 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 |