lib/backburner/queue.rb in backburner-1.0.0 vs lib/backburner/queue.rb in backburner-1.1.0
- old
+ new
@@ -20,10 +20,10 @@
#
def queue(name=nil)
if name
@queue_name = name
else # accessor
- @queue_name || Backburner.configuration.primary_queue
+ (@queue_name.is_a?(Proc) ? @queue_name.call(self) : @queue_name) || Backburner.configuration.primary_queue
end
end
# Returns or assigns queue priority for this job
#