Class: CanvasSync::Jobs::LegacyReportShimTask
- Inherits:
-
ReportSyncTask
- Object
- ReportSyncTask
- CanvasSync::Jobs::LegacyReportShimTask
- Defined in:
- lib/canvas_sync/jobs/report_starter.rb
Overview
Internal shim task that reads configuration from batch_context to support the old ReportStarter API
Constant Summary
Constants inherited from ReportSyncTask
ReportSyncTask::AUTO_MODEL_REGEX, ReportSyncTask::COMPILATION_TIMEOUT, ReportSyncTask::MAX_TRIES, ReportSyncTask::REPORT_TIMEOUT
Instance Attribute Summary
Attributes inherited from ReportSyncTask
Instance Method Summary collapse
Methods inherited from ReportSyncTask
#caching_key, #check_frequency, from_context, #initialize, #max_tries, merge_report_params, model, perform_later, perform_now, report_name
Constructor Details
This class inherits a constructor from CanvasSync::Jobs::ReportSyncTask
Instance Method Details
#process(file) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/canvas_sync/jobs/report_starter.rb', line 51 def process(file) processor_class_name = [:legacy_report_starter][:processor] processor_class = processor_class_name.constantize account_id = [:account_id] || batch_context[:account_id] || "self" # The old processor signature: process(file_path, options, report_id) # Note: The third param was report_id in ReportProcessorJob but was account_id in practice processor_class.process(file, , account_id) end |
#report_name ⇒ Object
43 44 45 |
# File 'lib/canvas_sync/jobs/report_starter.rb', line 43 def report_name [:legacy_report_starter][:report] end |
#report_parameters ⇒ Object
47 48 49 |
# File 'lib/canvas_sync/jobs/report_starter.rb', line 47 def report_parameters [:legacy_report_starter][:params] end |