quirkey/resque-status

Dynamic Queue Names

Closed this issue · 1 comments

Hey, we've been using resque for a with a dynamic lookup for the queue name, something like this:

  def self.enqueue(nas)
     Resque::Job.create(select_queue(foo), self, foo.id )
 end

 def self.select_queue(foo)
    FooHelper.queue(foo)
 end

 def perform
     bar
 end

However, I can't see to get this to work with your plugin.

Have you seen this working? S

I think you only need to change it slightly - it uses queue on the class or Resque.queue_from_class() to determine the queue:

https://github.com/quirkey/resque-status/blob/master/lib/resque/plugins/status.rb#L88