Sha256: 765d1e5e13c69095c309f5b43bcced1bf1c0d7661702b91c8c037b4c61ac2e4d

Contents?: true

Size: 507 Bytes

Versions: 4

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

4 entries across 4 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.9.2 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-1.0.0 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.9.1 app/jobs/geoblacklight_sidecar_images/store_image_job.rb
geoblacklight_sidecar_images-0.9.0 app/jobs/geoblacklight_sidecar_images/store_image_job.rb