mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Update how we eager load Rails applications, #1791
This commit is contained in:
parent
e6e95c6168
commit
8ea10ca669
3 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
3.2.0
|
||||
-----------
|
||||
|
||||
- Update how Sidekiq eager loads Rails application code [#1791, jonleighton]
|
||||
|
||||
3.1.4
|
||||
-----------
|
||||
|
||||
|
|
|
@ -221,10 +221,10 @@ module Sidekiq
|
|||
raise ArgumentError, "#{options[:require]} does not exist" unless File.exist?(options[:require])
|
||||
|
||||
if File.directory?(options[:require])
|
||||
require 'rails'
|
||||
require File.expand_path("#{options[:require]}/config/application.rb")
|
||||
Rails.application.config.eager_load = true
|
||||
require 'sidekiq/rails'
|
||||
require File.expand_path("#{options[:require]}/config/environment.rb")
|
||||
::Rails.application.eager_load!
|
||||
options[:tag] ||= default_tag
|
||||
else
|
||||
require options[:require]
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Sidekiq
|
||||
VERSION = "3.1.4"
|
||||
VERSION = "3.2.0"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue