aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
Diffstat (limited to 'activejob')
-rw-r--r--activejob/CHANGELOG.md2
-rw-r--r--activejob/lib/active_job/queue_adapter.rb2
-rw-r--r--activejob/lib/active_job/queue_adapters.rb4
3 files changed, 7 insertions, 1 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index aba386c18e..c523723fc4 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -3,7 +3,7 @@
Fixes #18821.
- *Kevin Deisz* And *Jeroen van Baarsen*
+ *Kevin Deisz*, *Jeroen van Baarsen*
* `assert_enqueued_jobs` and `assert_performed_jobs` in block form use the
given number as expected value. This makes the error message much easier to
diff --git a/activejob/lib/active_job/queue_adapter.rb b/activejob/lib/active_job/queue_adapter.rb
index 054a5d93b4..457015b741 100644
--- a/activejob/lib/active_job/queue_adapter.rb
+++ b/activejob/lib/active_job/queue_adapter.rb
@@ -15,6 +15,8 @@ module ActiveJob
# Includes the setter method for changing the active queue adapter.
module ClassMethods
+ # Returns the backend queue provider. The default queue adapter
+ # is the +:inline+ queue. See QueueAdapters for more information.
def queue_adapter
_queue_adapter
end
diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb
index bd69e525bb..1335e3236e 100644
--- a/activejob/lib/active_job/queue_adapters.rb
+++ b/activejob/lib/active_job/queue_adapters.rb
@@ -116,6 +116,10 @@ module ActiveJob
private_constant :ADAPTER
class << self
+ # Returns adapter for specified name.
+ #
+ # ActiveJob::QueueAdapters.lookup(:sidekiq)
+ # # => ActiveJob::QueueAdapters::SidekiqAdapter
def lookup(name)
const_get(name.to_s.camelize << ADAPTER)
end