Class: Decidim::Accountability::Admin::ImportResultsCsvJob

Inherits:
Decidim::ApplicationJob show all
Defined in:
decidim-accountability/app/jobs/decidim/accountability/admin/import_results_csv_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(current_user, current_component, csv_file) ⇒ Object


9
10
11
12
13
14
15
# File 'decidim-accountability/app/jobs/decidim/accountability/admin/import_results_csv_job.rb', line 9

def perform(current_user, current_component, csv_file)
  importer = Decidim::Accountability::ResultsCsvImporter.new(current_component, csv_file, current_user)

  errors = importer.import!

  Decidim::Accountability::ImportMailer.import(current_user, errors).deliver_now
end