Class: Elasticsearch::Model::Extensions::DelayedJob::PartiallyUpdateDocumentJob

Inherits:
DocumentJob
  • Object
show all
Defined in:
lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb

Instance Method Summary collapse

Methods inherited from DocumentJob

#enqueue!, #max_attempts

Constructor Details

#initialize(params) ⇒ PartiallyUpdateDocumentJob

Returns a new instance of PartiallyUpdateDocumentJob.



9
10
11
12
# File 'lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb', line 9

def initialize(params)
  super(record: params[:record])
  @changes = params[:changes]
end

Instance Method Details

#performObject



14
15
16
17
18
# File 'lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb', line 14

def perform
  try_with_record do |record|
    record.partially_update_document(*@changes)
  end
end