Sha256: 619276596331a9f848902b0d8d8b54ada29b5c0fdba6cb20526ff3252149f2d8
Contents?: true
Size: 993 Bytes
Versions: 13
Compression:
Stored size: 993 Bytes
Contents
class CreateDerivativesJob < ActiveJob::Base queue_as CurationConcerns.config.ingest_queue_name # @param [FileSet] file_set # @param [String] file_id identifier for a Hydra::PCDM::File # @param [String, NilClass] filepath the cached file within the CurationConcerns.config.working_path def perform(file_set, file_id, filepath = nil) return if file_set.video? && !CurationConcerns.config.enable_ffmpeg filename = CurationConcerns::WorkingDirectory.find_or_retrieve(file_id, file_set.id, filepath) file_set.create_derivatives(filename) # Reload from Fedora and reindex for thumbnail and extracted text file_set.reload file_set.update_index file_set.parent.update_index if parent_needs_reindex?(file_set) end # If this file_set is the thumbnail for the parent work, # then the parent also needs to be reindexed. def parent_needs_reindex?(file_set) return false unless file_set.parent file_set.parent.thumbnail_id == file_set.id end end
Version data entries
13 entries across 13 versions & 1 rubygems