aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/railtie.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-03-02 02:56:53 +1030
committerMatthew Draper <matthew@trebex.net>2016-03-02 02:56:53 +1030
commit541e4abb4b3710a384aefac83cafd0ab878c60bf (patch)
tree55603da9b6f9407a24c68e1d1fd53e109c4131e7 /activejob/lib/active_job/railtie.rb
parentecdc0fbc872ea734adf29b3f9f3463b916235286 (diff)
parent60b53e9883bfd9f4edb640dbe2de89227b875e09 (diff)
downloadrails-541e4abb4b3710a384aefac83cafd0ab878c60bf.tar.gz
rails-541e4abb4b3710a384aefac83cafd0ab878c60bf.tar.bz2
rails-541e4abb4b3710a384aefac83cafd0ab878c60bf.zip
Merge pull request #23807 from matthewd/executor
Publish AS::Executor and AS::Reloader APIs
Diffstat (limited to 'activejob/lib/active_job/railtie.rb')
-rw-r--r--activejob/lib/active_job/railtie.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activejob/lib/active_job/railtie.rb b/activejob/lib/active_job/railtie.rb
index b249ec09dd..a47caa4a7e 100644
--- a/activejob/lib/active_job/railtie.rb
+++ b/activejob/lib/active_job/railtie.rb
@@ -19,5 +19,14 @@ module ActiveJob
end
end
+ initializer "active_job.set_reloader_hook" do |app|
+ ActiveSupport.on_load(:active_job) do
+ ActiveJob::Callbacks.singleton_class.set_callback(:execute, :around, prepend: true) do |_, inner|
+ app.reloader.wrap do
+ inner.call
+ end
+ end
+ end
+ end
end
end