Class: Workarea::ProcessReportsExport

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::CallbacksWorker, Sidekiq::Throttled::Worker, Sidekiq::Worker
Defined in:
app/workers/workarea/process_reports_export.rb

Instance Method Summary collapse

Instance Method Details

#perform(id) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/workers/workarea/process_reports_export.rb', line 10

def perform(id)
  export = Reports::Export.find(id)

  export.process! do |csv|
    ExportReport.new(export.report, csv).perform!
  end

  Admin::ReportsMailer.export(id).deliver_now
end