Class: Lcms::Engine::DocumentParseJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Lcms::Engine::DocumentParseJob
- Includes:
- RetryDelayed, ResqueJob
- Defined in:
- app/jobs/lcms/engine/document_parse_job.rb
Instance Method Summary collapse
Methods included from ResqueJob
included, #result_key, #store_initial_result, #store_result
Instance Method Details
#perform(entry, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/jobs/lcms/engine/document_parse_job.rb', line 13 def perform(entry, = {}) if entry.is_a?(Document) @document = entry reimport_materials if [:reimport_materials].present? reimport_document(@document.file_url) if result.nil? @document.update(reimported: false) unless result[:ok] else reimport_document entry end store_result result, end |