Sha256: a6b62a35727809adbe1c9b633504ddd8a185f4f12089f80de1499f0ad0508d91

Contents?: true

Size: 552 Bytes

Versions: 2

Compression:

Stored size: 552 Bytes

Contents

class CharacterizeJob < ActiveJob::Base
  queue_as CurationConcerns.config.ingest_queue_name

  # @param [FileSet] file_set
  # @param [String] filename a local path for the file to characterize.
  def perform(file_set, filename)
    error_msg = "#{file_set.class.characterization_proxy} was not found"
    raise(LoadError, error_msg) unless file_set.characterization_proxy?
    Hydra::Works::CharacterizationService.run(file_set.characterization_proxy, filename)
    file_set.save!
    CreateDerivativesJob.perform_later(file_set, filename)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geo_concerns-0.0.5 lib/generators/geo_concerns/templates/jobs/characterize_job.rb
geo_concerns-0.0.4 lib/generators/geo_concerns/templates/jobs/characterize_job.rb