From 9b28a2ff4add8b55a6a80f5fe33b7bb7d4280746 Mon Sep 17 00:00:00 2001 From: Steven Chanin Date: Tue, 9 May 2017 09:40:20 -0700 Subject: [ci skip] explain async queue and rake tasks [ci skip] --- guides/source/active_job_basics.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guides/source') diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md index b58ca61848..ee8e652485 100644 --- a/guides/source/active_job_basics.md +++ b/guides/source/active_job_basics.md @@ -310,6 +310,12 @@ UserMailer.welcome(@user).deliver_now UserMailer.welcome(@user).deliver_later ``` +NOTE: Using the asynchronous queue from a rake task (for example, to +send an email using `.deliver_later`) will generally not work because rake will +likely end, causing the in-process thread pool to be deleted, before any/all +of the `.deliver_later` emails are processed. To avoid this problem, use +`.deliver_now` or run a persistent queue in development as well. + Internationalization -------------------- -- cgit v1.2.3