Sha256: 1807b297bd9436b8186a58560fdf6533975c33a41d231c6c9d3387381500a4be
Contents?: true
Size: 689 Bytes
Versions: 20
Compression:
Stored size: 689 Bytes
Contents
class CreateDerivativesJob < ActiveJob::Base queue_as :derivatives # @param [FileSet] file_set # @param [String] file_name def perform(file_set, file_name) return if file_set.video? && !CurationConcerns.config.enable_ffmpeg file_set.create_derivatives(file_name) # The thumbnail is indexed in the solr document, so reindex 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
20 entries across 20 versions & 2 rubygems