summaryrefslogtreecommitdiffstats
path: root/lib/tasks/email.rake
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-02 07:07:02 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-02 07:07:02 +0000
commit2d3f3cd9aa45dfa9317b14c9d877243b0f718a63 (patch)
tree7aef7350eec5650be661a1d5ea615d81cb9cee15 /lib/tasks/email.rake
parentbcc5ac38f3b77d050857fd33ee1a6e2d31828399 (diff)
downloadredmine-2d3f3cd9aa45dfa9317b14c9d877243b0f718a63.tar.gz
redmine-2d3f3cd9aa45dfa9317b14c9d877243b0f718a63.zip
Use async email deliveries in rake tasks (#16784).
git-svn-id: http://svn.redmine.org/redmine/trunk@13123 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/email.rake')
-rw-r--r--lib/tasks/email.rake12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake
index 84eb27928..875f82fff 100644
--- a/lib/tasks/email.rake
+++ b/lib/tasks/email.rake
@@ -55,7 +55,9 @@ Examples:
END_DESC
task :read => :environment do
- MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
+ Mailer.with_synched_deliveries do
+ MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
+ end
end
desc <<-END_DESC
@@ -122,7 +124,9 @@ END_DESC
:move_on_success => ENV['move_on_success'],
:move_on_failure => ENV['move_on_failure']}
- Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV))
+ Mailer.with_synched_deliveries do
+ Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV))
+ end
end
desc <<-END_DESC
@@ -149,7 +153,9 @@ END_DESC
:password => ENV['password'],
:delete_unprocessed => ENV['delete_unprocessed']}
- Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV))
+ Mailer.with_synched_deliveries do
+ Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV))
+ end
end
desc "Send a test email to the user with the provided login name"