Class: Kithe::CreateDerivativesJob

Inherits:
Job
  • Object
show all
Defined in:
app/jobs/kithe/create_derivatives_job.rb

Overview

Create derivatives in a bg job.

Used as part of kithe standard ingest flow, to create all derivatives in bg job for new ingest

Can also be used explicitly, with args, to create only certain derivs, optionally lazily

Examples:


CreateDerivativesJob.new(asset).perform_later

CreateDerivativesJob.new(asset, lazy: true).perform_later

CreateDerivativesJob.new(asset, only: :some_deriv, lazy: true).perform_later

CreateDerivativesJob.new(asset, except: :other_deriv, lazy: true).perform_later

Instance Method Summary collapse

Instance Method Details

#perform(asset, lazy: false, only: nil, except: nil) ⇒ Object



19
20
21
# File 'app/jobs/kithe/create_derivatives_job.rb', line 19

def perform(asset, lazy: false, only: nil, except: nil)
    asset.create_derivatives(lazy: lazy, only: only, except: except)
end