Skip to content
Discussion options

You must be logged in to vote

Weighted queues would accomplish what you want:

---
:queues:
  - [high, 1]
  - [default, 1]
:concurrency: 10

This configuration means that the next job that is executed has a 50% chance of being from the high queue and a 50% chance of being from the default queue.

You could also make Capsules when Sidekiq 7 comes out. Using your example:

Sidekiq.configure_server do |config|
  config.capsule("important") do |cap|
    cap.concurrency = 5
    cap.queues = %w[important]
  end
  config.capsule("default") do |cap|
    cap.concurrency = 5
    cap.queues = %w[default]
  end
end

This would have an advantage over weighted queues - the concurrency of each queue is limited to 5. With weighted queues,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaku0225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants