Rails Rails 4.2.0 之后 Active Job 集成到 Action Mailer 里了 请问异步发送邮件还需要特殊的配置么

zouyu · August 03, 2015 · Last by zouyu replied at January 31, 2016 · 1604 hits

rails 4.2.0 之后 Active Job 集成到 Action Mailer 里了 请问异步发送邮件还需要特殊的配置么

需要,你仍然需要配置一个 active_job 的 adapter,以及后台队列实现如 Sidekiq,否则如果系统没有检测到你配置的 adapter 的话,会从异步发送 fallback 到同步发送。

传送门: http://guides.rubyonrails.org/active_job_basics.html#job-execution

If no adapter is set, the job is immediately executed.

意思就是,看 #1 楼 @lgn21st

3 Floor has deleted

当时项目中使用了 resque,设置了一个队列的前缀,然后和 Rails 默认的有冲突,无法异步发送了

You need to Sign in before reply, if you don't have an account, please Sign up first.