diff --git a/app/workers/reports_creator_worker.rb b/app/workers/reports_creator_worker.rb index 466c485ca1..a1c231c382 100644 --- a/app/workers/reports_creator_worker.rb +++ b/app/workers/reports_creator_worker.rb @@ -1,6 +1,7 @@ class ReportsCreatorWorker include Sidekiq::Worker include Sidekiq::Status::Worker + sidekiq_options queue: :report_creator def perform(legal_aid_application_id) legal_aid_application = LegalAidApplication.find(legal_aid_application_id) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 6598be50dd..a03ec80d2a 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -15,6 +15,10 @@ Sidekiq.configure_server do |config| config.redis = { url: redis_url } + config.capsule("report_capsule") do |cap| + cap.concurrency = 2 + cap.queues = %w[report_creator] + end # accepts :expiration (optional) Sidekiq::Status.configure_server_middleware config, expiration: 30.minutes.to_i