Class: GeoblacklightSidecarImages::StoreImageJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/geoblacklight_sidecar_images/store_image_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(solr_document_id) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'app/jobs/geoblacklight_sidecar_images/store_image_job.rb', line 7

def perform(solr_document_id)
  document = Geoblacklight::SolrDocument.find(solr_document_id)

   = {}
  ["solr_doc_id"] = document.id
  ["solr_version"] = document.sidecar.version

  document.sidecar.image_state.transition_to!(:queued, )
  GeoblacklightSidecarImages::ImageService.new(document).store
end