brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

ActiveJob and self.queue_adapter #176

Closed phlegx closed 8 years ago

phlegx commented 8 years ago

Hi! I use Rails 4.2.3 and the latest sucker_punch version 2.0.2. How can I set the number of workers?

Here my job class:

class TestJob < ActiveJob::Base
  self.queue_adapter = :sucker_punch
  queue_as :high
  workers 10

  def perform
  end
end

I get the following error: NoMethodError: undefined method 'workers' for TestJob:Class Read here: https://github.com/rails/activejob/issues/47

brandonhilkert commented 8 years ago

I believe you'd have to use Sucker Punch as documented without ActiveJob to make that work.