Sha256: 2b0cb30dab701f1a7bb1cf71dd63891d6a6cfc4994ede27156cede4763205f7c

Contents?: true

Size: 507 Bytes

Versions: 8

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module GeoblacklightSidecarImages
  class StoreImageJob < ApplicationJob
    queue_as :default

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

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.8.1 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.8.0 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.7.0 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.6.5 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.6.4 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.6.2 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.6.1 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.6.0 app/jobs/geoblacklight_sidecar_images/store_image_job.rb