From 5da2eac1bb8a5897eccbe90af793db8e8dc4bb6b Mon Sep 17 00:00:00 2001 From: Peter N Lewis Date: Sat, 21 Jun 2014 15:57:49 +0800 Subject: [PATCH] Add a SiteSetting to control the pop3 polling period. The default 5 minutes may add too much lag for some sites used to mailing list performance. Unfortunately, this seems to require restarting the server for the change to be noticed - is there any way to avoid that, or otherwise should this be noted in the setting text? --- app/jobs/scheduled/poll_mailbox.rb | 2 +- config/locales/server.en.yml | 1 + config/site_settings.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/jobs/scheduled/poll_mailbox.rb b/app/jobs/scheduled/poll_mailbox.rb index dea08f09be5..f06715e3606 100644 --- a/app/jobs/scheduled/poll_mailbox.rb +++ b/app/jobs/scheduled/poll_mailbox.rb @@ -8,7 +8,7 @@ require_dependency 'email/message_builder' module Jobs class PollMailbox < Jobs::Scheduled - every 5.minutes + every SiteSetting.pop3s_polling_period_mins.minutes sidekiq_options retry: false include Email::BuildEmailHelper diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 4795c82ba89..352f684f1f3 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -854,6 +854,7 @@ en: pop3s_polling_enabled: "Poll via POP3S for email replies" pop3s_polling_insecure: "Poll using plain text POP3 without SSL" + pop3s_polling_period_mins: "The period in minutes between checking the POP3S account for email" pop3s_polling_port: "The port to poll a POP3S account on" pop3s_polling_host: "The host to poll for email via POP3S" pop3s_polling_username: "The username for the POP3S account to poll for email" diff --git a/config/site_settings.yml b/config/site_settings.yml index b203a83b88d..99db74df8ba 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -348,6 +348,7 @@ email: reply_by_email_address: '' pop3s_polling_enabled: false pop3s_polling_insecure: false + pop3s_polling_period_mins: 5 pop3s_polling_host: '' pop3s_polling_port: 995 pop3s_polling_username: ''