From 8608b5cbc1b4c4ae27668cfeb75ca1c94819d3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 1 Feb 2016 16:56:32 +0100 Subject: [PATCH] FIX: don't poll the mailbox in development --- app/jobs/scheduled/poll_mailbox.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/jobs/scheduled/poll_mailbox.rb b/app/jobs/scheduled/poll_mailbox.rb index 2d141e3b1..c35326785 100644 --- a/app/jobs/scheduled/poll_mailbox.rb +++ b/app/jobs/scheduled/poll_mailbox.rb @@ -12,7 +12,12 @@ module Jobs def execute(args) @args = args - poll_pop3 if SiteSetting.pop3_polling_enabled? + poll_pop3 if should_poll? + end + + def should_poll? + return false if Rails.env.development? && ENV["POLL_MAILBOX"].nil? + SiteSetting.pop3_polling_enabled? end def process_popmail(popmail)