Skip to content

Commit

Permalink
[ActiveJob] Autoload adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Aug 26, 2014
1 parent 49b27db commit 7e99855
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion activejob/lib/active_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ module ActiveJob
extend ActiveSupport::Autoload

autoload :Base
end
autoload :QueueAdapters
end
1 change: 0 additions & 1 deletion activejob/lib/active_job/queue_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def queue_adapter=(name_or_adapter)

private
def load_adapter(name)
require "active_job/queue_adapters/#{name}_adapter"
"ActiveJob::QueueAdapters::#{name.to_s.camelize}Adapter".constantize
end
end
Expand Down
16 changes: 16 additions & 0 deletions activejob/lib/active_job/queue_adapters.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7e99855

Please sign in to comment.