Commit 3cb1e96e authored by Rémy Coutable's avatar Rémy Coutable

Avoid autoload issue such as 'Mail::Parsers::AddressStruct'

By eager-loading the Mail gem in the Sidekiq initializer.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 44b8b77e
......@@ -23,6 +23,10 @@ Sidekiq.configure_server do |config|
config['pool'] = Sidekiq.options[:concurrency] + 2
ActiveRecord::Base.establish_connection(config)
Rails.logger.debug("Connection Pool size for Sidekiq Server is now: #{ActiveRecord::Base.connection.pool.instance_variable_get('@size')}")
# Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
# https://github.com/mikel/mail/issues/912#issuecomment-214850355
Mail.eager_autoload!
end
Sidekiq.configure_client do |config|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment