author avatar

sujay

Thu Mar 21 2024

Sidekiq Capsule allows to configure queues to execute jobs serially.
Before Sidekiq version 7, to manage dependencies between jobs, a delay was often manually set with set(wait: 30.seconds) to ensure the sequential execution of dependent jobs. This can be achieved now by setting their concurrency to 1.


Sidekiq.configure_server do |config|
  config.capsule("capsule") do |cap|
    cap.concurrency = 1
    cap.queues = %w[capsule-queue]
  end
end


#rails #sidekiq