aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib
diff options
context:
space:
mode:
authorBlake Gentry <blakesgentry@gmail.com>2014-10-09 10:33:55 -0700
committerBlake Gentry <blakesgentry@gmail.com>2014-10-09 19:42:43 -0700
commit4a1dbba108ece1a957b26d1e6280c1a8cd986fe8 (patch)
tree624b7980b9575488f53a2dfcb8b09f5b8acc2c3c /activejob/lib
parente3207bdbba55f3806441f22b175557579bc0b051 (diff)
downloadrails-4a1dbba108ece1a957b26d1e6280c1a8cd986fe8.tar.gz
rails-4a1dbba108ece1a957b26d1e6280c1a8cd986fe8.tar.bz2
rails-4a1dbba108ece1a957b26d1e6280c1a8cd986fe8.zip
ActiveJob: allow blank queue names
As discussed in #17195, Que uses blank queue names by default for performance reasons. At the very least, ActiveJob should allow users to choose "" as their queue name. This commit allows blank queue names, as well as tests to make sure that nil queue names still use the default.
Diffstat (limited to 'activejob/lib')
-rw-r--r--activejob/lib/active_job/queue_name.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/queue_name.rb b/activejob/lib/active_job/queue_name.rb
index d6ac01a921..d167617e4e 100644
--- a/activejob/lib/active_job/queue_name.rb
+++ b/activejob/lib/active_job/queue_name.rb
@@ -24,7 +24,7 @@ module ActiveJob
end
def queue_name_from_part(part_name) #:nodoc:
- queue_name = part_name.to_s.presence || default_queue_name
+ queue_name = part_name || default_queue_name
name_parts = [queue_name_prefix.presence, queue_name]
name_parts.compact.join('_')
end