Class: CreateDerivativesJob

Inherits:
ActiveFedoraIdBasedJob show all
Defined in:
app/jobs/create_derivatives_job.rb

Instance Attribute Summary

Attributes inherited from ActiveFedoraIdBasedJob

#id

Instance Method Summary collapse

Methods inherited from ActiveFedoraIdBasedJob

#initialize, #object

Constructor Details

This class inherits a constructor from ActiveFedoraIdBasedJob

Instance Method Details

#queue_nameObject



2
3
4
# File 'app/jobs/create_derivatives_job.rb', line 2

def queue_name
  :derivatives
end

#runObject



6
7
8
9
10
11
12
# File 'app/jobs/create_derivatives_job.rb', line 6

def run
  return unless generic_file.content.has_content?
  return if generic_file.video? && !Sufia.config.enable_ffmpeg

  generic_file.create_derivatives
  generic_file.save
end