diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-03-21 14:57:54 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-03-22 07:45:10 +0900 |
commit | fb1163949a23c66798d85181d62cd2f7a6736729 (patch) | |
tree | ae1059b066c9ab1635b6b544c81b03376e369528 /guides/source/action_mailer_basics.md | |
parent | dda31d59a03adb7e5aa372e72bb66a3886632f2f (diff) | |
download | rails-fb1163949a23c66798d85181d62cd2f7a6736729.tar.gz rails-fb1163949a23c66798d85181d62cd2f7a6736729.tar.bz2 rails-fb1163949a23c66798d85181d62cd2f7a6736729.zip |
update Active Job default adapter [ci skip]
Follow up to 625baa69d14881ac49ba2e5c7d9cac4b222d7022
Diffstat (limited to 'guides/source/action_mailer_basics.md')
-rw-r--r-- | guides/source/action_mailer_basics.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index 558c16f5b0..5346b7c32b 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -204,10 +204,14 @@ class UsersController < ApplicationController end ``` -NOTE: Active Job's default behavior is to execute jobs ':inline'. So, you can use -`deliver_later` now to send emails, and when you later decide to start sending -them from a background job, you'll only need to set up Active Job to use a queueing -backend (Sidekiq, Resque, etc). +NOTE: Active Job's default behavior is to execute jobs via the `:async` adapter. So, you can use +`deliver_later` now to send emails asynchronously. +Active Job's default adapter runs jobs with an in-process thread pool. +It's well-suited for the development/test environments, since it doesn't require +any external infrastructure, but it's a poor fit for production since it drops +pending jobs on restart. +If you need a persistent backend, you will need to use an Active Job adapter +that has a persistent backend (Sidekiq, Resque, etc). If you want to send emails right away (from a cronjob for example) just call `deliver_now`: |