简体   繁体   中英

How to configure procfile, sidekiq.yml so that different sidekiq queues run on different dynos in heroku?

I have 2 kinds of queues in Sidekiq: "default/low" - to cater web requests and "background_queue" - to run background processes like fetching tweets. I want to run "background_queue" workers on a different dyno, so that it doesn't block any web requests during that period.

My procfile looks like this.

web: bundle exec puma -C config/puma.rb
worker:  bundle exec sidekiq
background_worker:  bundle exec sidekiq

I see that i have successfully created background worker dyno in heroku.

So, how do i run jobs on background_worker ?

The problem got resolved. The following changes in the procfile did the job for me:

worker: bundle exec sidekiq -q default -q low
background_worker: bundle exec sidekiq -q background_queue

Added background_queue to sidekiq.yml with relevant priority

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM