Hello Friends, I am back with new real programming problem. In general practice when we are working with sidekiq and delayed jobs. The problem occurs when we want custom queue with custom sidekiq workers. In this blog I am going to discuss the same with an example Here we go:
Create Sidekiq worker:
You can create sidekiq worker class if you want that the jobs will perform by this class. This is not mandatory. Create a worker
Now you have a worker class that will pick the jobs from queue
Add queue name inside config/sidekiq.yml file:
config/sidekiq.yml file with weight.
Sidekiq check high weight queue first.
Adding sidekiq process to the queue
If you want to add dedicated sidekiq worker instance to the particular queue, so that This worker instance can handle jobs from
YOUR_QUEUE_NAME, then you can just add your
sidekiq -q YOUR_QUEUE_NAME
YOUR_QUEUE_NAME from your
config/sidekiq.yml file, Otherwise other instance will also start executing jobs from
sidekiq -C config/sidekiq.yml
To start sidekiq process for other queues. Thanks for reading for more documentation, Please refer the link