diff options
-rw-r--r-- | app/models/request_mailer.rb | 10 | ||||
-rw-r--r-- | config/general.yml-example | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index fc317d20d..e244aaac9 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -266,12 +266,12 @@ class RequestMailer < ApplicationMailer end end - # Send email alerts for new responses which haven't been classified. Goes - # out 3 days after last update of event, then after 7, then after 24. + # Send email alerts for new responses which haven't been classified. By default, + # it goes out 3 days after last update of event, then after 10, then after 24. def self.alert_new_response_reminders - self.alert_new_response_reminders_internal(3, 'new_response_reminder_1') - self.alert_new_response_reminders_internal(10, 'new_response_reminder_2') - self.alert_new_response_reminders_internal(24, 'new_response_reminder_3') + MySociety::Config.get("NEW_RESPONSE_REMINDER_AFTER_DAYS", [3, 10, 24]).each_with_index do |days, i| + self.alert_new_response_reminders_internal(days, "new_response_reminder_#{i+1}") + end end def self.alert_new_response_reminders_internal(days_since, type_code) info_requests = InfoRequest.find_old_unclassified(:order => 'info_requests.id', diff --git a/config/general.yml-example b/config/general.yml-example index e2652c848..c3f9b6650 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -94,6 +94,9 @@ STAGING_SITE: 1 RECAPTCHA_PUBLIC_KEY: 'x' RECAPTCHA_PRIVATE_KEY: 'x' +# Number of days after which to send a 'new response reminder' +NEW_RESPONSE_REMINDER_AFTER_DAYS: [3, 10, 24] + # For debugging memory problems. If true, the app logs # the memory use increase of the Ruby process due to the # request (Linux only). Since Ruby never returns memory to the OS, if the |