Class: CanvasSync::Jobs::ReportStarter Deprecated

Inherits:
CanvasSync::Job show all
Defined in:
lib/canvas_sync/jobs/report_starter.rb

Overview

Deprecated.

Use ReportSyncTask instead

This class is now a shim that delegates to LegacyReportShimTask for backwards compatibility. ReportChecker and ReportProcessorJob are no longer used when going through this shim.

Direct Known Subclasses

SyncSimpleTableJob

Instance Attribute Summary

Attributes inherited from CanvasSync::Job

#job_log

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_params, processor, options, allow_redownloads: false) ⇒ nil

Parameters:

  • report_name (String)

    e.g., 'provisioning_csv'

  • report_params (Hash)

    The Canvas report parameters

  • processor (String)

    a stringified report processor class name

  • options (Hash)

    hash of options that will be passed to the job processor

  • allow_redownloads (Boolean) (defaults to: false)

    whether you want the job_chain to cache this report, so that any later jobs in the chain will use the same generated report

Returns:

  • (nil)


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/canvas_sync/jobs/report_starter.rb', line 16

def perform(report_name, report_params, processor, options, allow_redownloads: false)
  # Merge the legacy configuration into options that will be passed through batch_context
  merged_options = options.merge({
    legacy_report_starter: {
      report: report_name,
      params: report_params,
      processor: processor,
    },
  })

  # Call perform_later on the shim task class
  LegacyReportShimTask.perform_later(merged_options)
end