1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/lib/active_job/queue_name.rb

18 lines
369 B
Ruby
Raw Normal View History

2014-05-19 05:04:23 -04:00
module ActiveJob
module QueueName
extend ActiveSupport::Concern
2014-05-19 05:04:23 -04:00
module ClassMethods
mattr_accessor(:queue_base_name) { "active_jobs" }
def queue_as(part_name)
self.queue_name = "#{queue_base_name}_#{part_name}"
end
end
included do
class_attribute :queue_name
self.queue_name = queue_base_name
2014-05-19 05:04:23 -04:00
end
end
end