Class: Lcms::Engine::DocumentBundleGenerateJob

Inherits:
ApplicationJob
  • Object
show all
Extended by:
ResqueJob
Defined in:
app/jobs/lcms/engine/document_bundle_generate_job.rb

Instance Method Summary collapse

Methods included from ResqueJob

included, result_key, store_initial_result, store_result

Instance Method Details

#perform(resource, options) ⇒ Object



10
11
12
13
14
15
# File 'app/jobs/lcms/engine/document_bundle_generate_job.rb', line 10

def perform(resource, options)
  category = options[:category]
  unit = resource.unit? ? resource : resource.parents.detect(&:unit?)

  DocumentBundle.update_bundle(unit, category) if unit
end