Search code examples
ruby-on-railsqueuesidekiq

Sidekiq processes queues only AFTER others are done?


Is it possible to process jobs from a Sidekiq queue ONLY if all other queues are empty?

For example, say we have a photos queue and a updates queue. I only want to process photos if updates is free of pending jobs.

Is that possible?


Solution

  • Well, all you queues execute in parallel, so I don't get the idea of executing consequentially. But you have several options to play with:

    1. you can make more concurrent workers
    2. you can set frequency higher to updates queue, so updates worker will check for updates more frequently then photo worker.

    Take a look at this options in doc