absessive
absessive

Reputation: 1171

Sidekiq worker not working from Rails engine

I have a rails app using an engine where Sidekiq workers are defined. The worker's perform_async is invoked in a controller within the engine. The worker's perform does the work on arguments passed in through that controller. The worker specific queue is defined in the worker class too. However, when a request comes in to that controller, it gets pushed to the redis server from 'perform_async', to the right queue. A bundle exec sidekiq starts up Sidekiq. However, the worker's perform never gets executed. Checking the sidekiq UI, I can see that the job is in the right queue. This is how my worker looks like

require 'pando'

class PandoWorker
  include Sidekiq::Worker

  sidekiq_options :queue => :pando, :backtrace=> true

  def perform(*args)
    puts "in here"
    puts args
  end

end

So in this case the sidekiq UI shows that the args are queued in 'pando'. The sidekiq process never processes from that queue or even the default.

Upvotes: 2

Views: 2375

Answers (1)

BroiSatse
BroiSatse

Reputation: 44675

You have to tell sidekiq process which queue to look at:

bundle exec sidekiq -q pando

Otherwise process is only watching 'default' queue.

Upvotes: 1

Related Questions