aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_job/queue_name.rb
blob: a606b67370b152654da73d026361d42100da9f73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
module ActiveJob
  module QueueName
    mattr_accessor(:queue_base_name) { "active_jobs" }
    mattr_accessor(:queue_name)      { queue_base_name }

    def queue_as(part_name)
      self.queue_name = "#{queue_base_name}_#{part_name}"
    end
  end
end