Class: CanvasSync::Jobs::ReportProcessorJob
- Inherits:
-
CanvasSync::Job
- Object
- ActiveJob::Base
- CanvasSync::Job
- CanvasSync::Jobs::ReportProcessorJob
- Defined in:
- lib/canvas_sync/jobs/report_processor_job.rb
Overview
ActiveJob class that wraps around a report processor. This job will download the report, and then pass the file path and options into the process method on the processor.
Instance Method Summary collapse
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time, #update_or_create_model
Instance Method Details
#perform(job_chain, report_name, report_url, processor, options, report_id) ⇒ nil
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/canvas_sync/jobs/report_processor_job.rb', line 15 def perform(job_chain, report_name, report_url, processor, , report_id) @job_log.update_attributes(job_class: processor) download(report_name, report_url) do |file_path| = job_chain[:global_options].merge().merge({ report_processor_job_id: @job_log.job_id }) processor.constantize.process(file_path, , report_id) end CanvasSync.invoke_next(job_chain) end |