diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-26 12:59:26 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-26 12:59:26 -0300 |
commit | 14e2bbf3ca9ae7d5c9664c51a9e301f996b89506 (patch) | |
tree | 2b783254c2459a79677b2c560c58a12d30ed1242 | |
parent | 2c84512a7217d130905f55ea0b33065a46dd4688 (diff) | |
parent | 7e99855dee8db2bf155a502fb3110f47487fcbdd (diff) | |
download | rails-14e2bbf3ca9ae7d5c9664c51a9e301f996b89506.tar.gz rails-14e2bbf3ca9ae7d5c9664c51a9e301f996b89506.tar.bz2 rails-14e2bbf3ca9ae7d5c9664c51a9e301f996b89506.zip |
Merge pull request #16700 from seuros/autoload
[ActiveJob] Autoload adapters
-rw-r--r-- | activejob/lib/active_job.rb | 3 | ||||
-rw-r--r-- | activejob/lib/active_job/queue_adapter.rb | 1 | ||||
-rw-r--r-- | activejob/lib/active_job/queue_adapters.rb | 16 |
3 files changed, 18 insertions, 2 deletions
diff --git a/activejob/lib/active_job.rb b/activejob/lib/active_job.rb index ef92406725..29123170b8 100644 --- a/activejob/lib/active_job.rb +++ b/activejob/lib/active_job.rb @@ -30,4 +30,5 @@ module ActiveJob extend ActiveSupport::Autoload autoload :Base -end
\ No newline at end of file + autoload :QueueAdapters +end diff --git a/activejob/lib/active_job/queue_adapter.rb b/activejob/lib/active_job/queue_adapter.rb index 8f2f8b86ea..13c23abce4 100644 --- a/activejob/lib/active_job/queue_adapter.rb +++ b/activejob/lib/active_job/queue_adapter.rb @@ -17,7 +17,6 @@ module ActiveJob private def load_adapter(name) - require "active_job/queue_adapters/#{name}_adapter" "ActiveJob::QueueAdapters::#{name.to_s.camelize}Adapter".constantize end end diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb new file mode 100644 index 0000000000..007068ff0a --- /dev/null +++ b/activejob/lib/active_job/queue_adapters.rb @@ -0,0 +1,16 @@ +module ActiveJob + module QueueAdapters + extend ActiveSupport::Autoload + + autoload :InlineAdapter + autoload :BackburnerAdapter + autoload :DelayedJobAdapter + autoload :QuAdapter + autoload :QueAdapter + autoload :QueueClassicAdapter + autoload :ResqueAdapter + autoload :SidekiqAdapter + autoload :SneakersAdapter + autoload :SuckerPunchAdapter + end +end |