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 Attribute Summary
Attributes inherited from CanvasSync::Job
Instance Method Summary collapse
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time, #update_or_create_model
Instance Method Details
#perform(report_name, report_url, processor, options, report_id) ⇒ nil
14 15 16 17 18 19 20 21 22 |
# File 'lib/canvas_sync/jobs/report_processor_job.rb', line 14 def perform(report_name, report_url, processor, , report_id) @job_log.update(job_class: processor) download(report_name, report_url) do |file_path| = batch_context.merge().merge({ report_processor_job_id: @job_log.job_id }) processor.constantize.process(file_path, , report_id) end end |