Skip to content

Commit 3f6c1d0

Browse files
committed
Eager load ActiveJob::ConfiguredJob and Serializers
Otherwise they are autoloaded when the first job is enqueued which isn't good for production performance.
1 parent 53fd8bd commit 3f6c1d0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

activejob/lib/active_job.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ module ActiveJob
3333

3434
autoload :Base
3535
autoload :QueueAdapters
36-
autoload :Serializers
37-
autoload :ConfiguredJob
36+
37+
eager_autoload do
38+
autoload :Serializers
39+
autoload :ConfiguredJob
40+
end
41+
3842
autoload :TestCase
3943
autoload :TestHelper
4044
autoload :QueryTags

0 commit comments

Comments
 (0)