diff --git a/app/jobs/email_scheme_csv_job.rb b/app/jobs/schemes_email_csv_job.rb similarity index 96% rename from app/jobs/email_scheme_csv_job.rb rename to app/jobs/schemes_email_csv_job.rb index 2165471e8..2e3f21652 100644 --- a/app/jobs/email_scheme_csv_job.rb +++ b/app/jobs/schemes_email_csv_job.rb @@ -1,4 +1,4 @@ -class EmailSchemeCsvJob < ApplicationJob +class SchemeEmailCsvJob < ApplicationJob queue_as :default BYTE_ORDER_MARK = "\uFEFF".freeze # Required to ensure Excel always reads CSV as UTF-8 @@ -6,7 +6,7 @@ class EmailSchemeCsvJob < ApplicationJob EXPIRATION_TIME = 24.hours.to_i def perform(user, search_term = nil, filters = {}, all_orgs = false, organisation = nil, download_type = "combined") # rubocop:disable Style/OptionalBooleanParameter - sidekiq can't serialise named params - unfiltered_schemes = organisation.present? && user.support? ? Scheme.where(owning_organisation_id: organisation.id) : user.schemes.visible + unfiltered_schemes = organisation.present? && user.support? ? Scheme.where(owning_organisation_id: organisation.id) : user.schemes filtered_schemes = FilterManager.filter_schemes(unfiltered_schemes, search_term, filters, all_orgs, user) case download_type