From 7af662f12f23c0cdfcce56974fe7969dc8666516 Mon Sep 17 00:00:00 2001 From: Kat <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:46:58 +0000 Subject: [PATCH] Update expiration time --- app/jobs/email_csv_job.rb | 2 +- app/jobs/scheme_email_csv_job.rb | 2 +- spec/jobs/email_csv_job_spec.rb | 4 ++-- spec/jobs/scheme_email_csv_job_spec.rb | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/jobs/email_csv_job.rb b/app/jobs/email_csv_job.rb index ca63e2870..05e6c0cbb 100644 --- a/app/jobs/email_csv_job.rb +++ b/app/jobs/email_csv_job.rb @@ -4,7 +4,7 @@ class EmailCsvJob < ApplicationJob BYTE_ORDER_MARK = "\uFEFF".freeze # Required to ensure Excel always reads CSV as UTF-8 - EXPIRATION_TIME = 24.hours.to_i + EXPIRATION_TIME = 48.hours.to_i def perform(user, search_term = nil, filters = {}, all_orgs = false, organisation = nil, codes_only_export = false, log_type = "lettings", year = nil) # rubocop:disable Style/OptionalBooleanParameter - sidekiq can't serialise named params export_type = codes_only_export ? "codes" : "labels" diff --git a/app/jobs/scheme_email_csv_job.rb b/app/jobs/scheme_email_csv_job.rb index 0c9c1b696..50c5119a3 100644 --- a/app/jobs/scheme_email_csv_job.rb +++ b/app/jobs/scheme_email_csv_job.rb @@ -4,7 +4,7 @@ class SchemeEmailCsvJob < ApplicationJob BYTE_ORDER_MARK = "\uFEFF".freeze # Required to ensure Excel always reads CSV as UTF-8 - EXPIRATION_TIME = 24.hours.to_i + EXPIRATION_TIME = 48.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 = if organisation.present? && user.support? diff --git a/spec/jobs/email_csv_job_spec.rb b/spec/jobs/email_csv_job_spec.rb index 6ef96d1c9..59cf7bf7d 100644 --- a/spec/jobs/email_csv_job_spec.rb +++ b/spec/jobs/email_csv_job_spec.rb @@ -72,7 +72,7 @@ describe EmailCsvJob do expect(CsvDownload.first.organisation).to eq(user.organisation) expect(CsvDownload.first.filename).to match(/lettings-logs-.*\.csv/) expect(CsvDownload.first.download_type).to eq("lettings") - expect(CsvDownload.first.expiration_time).to eq(86_400) + expect(CsvDownload.first.expiration_time).to eq(172_800) end end @@ -117,7 +117,7 @@ describe EmailCsvJob do expect(CsvDownload.first.organisation).to eq(user.organisation) expect(CsvDownload.first.filename).to match(/sales-logs-.*\.csv/) expect(CsvDownload.first.download_type).to eq("sales") - expect(CsvDownload.first.expiration_time).to eq(86_400) + expect(CsvDownload.first.expiration_time).to eq(172_800) end end diff --git a/spec/jobs/scheme_email_csv_job_spec.rb b/spec/jobs/scheme_email_csv_job_spec.rb index 53873d0e7..efb75b698 100644 --- a/spec/jobs/scheme_email_csv_job_spec.rb +++ b/spec/jobs/scheme_email_csv_job_spec.rb @@ -59,7 +59,7 @@ describe SchemeEmailCsvJob do expect(CsvDownload.first.organisation).to eq(user.organisation) expect(CsvDownload.first.filename).to match(/schemes-.*\.csv/) expect(CsvDownload.first.download_type).to eq("schemes") - expect(CsvDownload.first.expiration_time).to eq(86_400) + expect(CsvDownload.first.expiration_time).to eq(172_800) end end @@ -78,7 +78,7 @@ describe SchemeEmailCsvJob do expect(CsvDownload.first.organisation).to eq(user.organisation) expect(CsvDownload.first.filename).to match(/locations-.*\.csv/) expect(CsvDownload.first.download_type).to eq("locations") - expect(CsvDownload.first.expiration_time).to eq(86_400) + expect(CsvDownload.first.expiration_time).to eq(172_800) end end @@ -97,7 +97,7 @@ describe SchemeEmailCsvJob do expect(CsvDownload.first.organisation).to eq(user.organisation) expect(CsvDownload.first.filename).to match(/schemes-and-locations-.*\.csv/) expect(CsvDownload.first.download_type).to eq("combined") - expect(CsvDownload.first.expiration_time).to eq(86_400) + expect(CsvDownload.first.expiration_time).to eq(172_800) end end