I want all calls to the queue to be in a specific queue by default, unless otherwise specified, therefore it is DRY and easier to maintain. To indicate the queue, the documentation indicated that the variable @queue = X was set in the class. So, I tried to do the following and it did not work, any ideas?
class ResqueJob
class << self; attr_accessor :queue end
@queue = :app
end
class ChildJob < ResqueJob
def self.perform
end
end
Resque.enqueue(ChildJob)
Resque::NoQueueError: Jobs must be placed onto a queue.
from /Library/Ruby/Gems/1.8/gems/resque-1.10.0/lib/resque/job.rb:44:in `create'
from /Library/Ruby/Gems/1.8/gems/resque-1.10.0/lib/resque.rb:206:in `enqueue'
from (irb):5
source
share