diff options
author | Samuel Cochran <sj26@sj26.com> | 2018-05-24 06:50:36 +1000 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2018-05-23 16:50:36 -0400 |
commit | 4d43b05881265ee02cb4b7ab37d7e1fa49559184 (patch) | |
tree | c8b373bc7b75fb4d65801ed6c3e786b886129bf3 /activejob/lib/active_job | |
parent | 78a9de52ddccefd01af2b88c21450dc29386f029 (diff) | |
download | rails-4d43b05881265ee02cb4b7ab37d7e1fa49559184.tar.gz rails-4d43b05881265ee02cb4b7ab37d7e1fa49559184.tar.bz2 rails-4d43b05881265ee02cb4b7ab37d7e1fa49559184.zip |
Eager autoload mail gem when eager load is true (#32808)
* Eager autoload mail gem when eager load is true
We had a production issue where our Sidekiq worker threads all became
deadlocked while autoloading a file within the mail gem, required via
ActionMailer, despite setting our Rails applicaiton to eager load.
`Mail.eager_autoload!` exists and works great, ActionMailer just doesn't
call it during eager loading. Adding it to the ActionMailer Railtie's
eager_load_namespaces takes care of calling `Mail.eager_autoload!`
during the `eager_load!` initializer.
* 'Mail' isn't defined yet, use before_eager_load instead
* Make sure mail is loaded
* Move eager load of Mail into ActionMailer.eager_load!
[Samuel Cochran + Rafael Mendonça França]
Diffstat (limited to 'activejob/lib/active_job')
0 files changed, 0 insertions, 0 deletions