aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/active_job.rb1
-rw-r--r--lib/active_job/base.rb2
-rw-r--r--lib/active_job/railtie.rb (renamed from lib/active_job/railitie.rb)5
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/active_job.rb b/lib/active_job.rb
index ba18cc093a..ddfdda4fb4 100644
--- a/lib/active_job.rb
+++ b/lib/active_job.rb
@@ -24,6 +24,7 @@
require 'active_support'
require 'active_support/rails'
+require 'active_job/railtie' if defined?(Rails)
require 'active_job/version'
module ActiveJob
diff --git a/lib/active_job/base.rb b/lib/active_job/base.rb
index 3d16f38275..d4f0f6777c 100644
--- a/lib/active_job/base.rb
+++ b/lib/active_job/base.rb
@@ -9,5 +9,7 @@ module ActiveJob
extend QueueName
extend Enqueuing
extend Logging
+
+ ActiveSupport.run_load_hooks(:active_job, self)
end
end
diff --git a/lib/active_job/railitie.rb b/lib/active_job/railtie.rb
index e6bd447150..08555d1d77 100644
--- a/lib/active_job/railitie.rb
+++ b/lib/active_job/railtie.rb
@@ -1,11 +1,10 @@
-require 'active_model/global_id'
-require 'active_job'
+require 'active_model/railtie'
module ActiveJob
# = Active Job Railtie
class Railtie < Rails::Railtie # :nodoc:
initializer 'active_job' do
- ActiveSupport.on_load(:active_job) { Base.logger = ::Rails.logger }
+ ActiveSupport.on_load(:active_job) { self.logger = ::Rails.logger }
end
end
end \ No newline at end of file