Skip to content
  • Samuel Cochran's avatar
    5d5cbbe0
    Eager autoload mail gem when eager load is true (#32808) · 5d5cbbe0
    Samuel Cochran authored
    * 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]
    5d5cbbe0
    Eager autoload mail gem when eager load is true (#32808)
    Samuel Cochran authored
    * 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]
Loading