diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index f4ede17d4..c6ef80a48 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -90,3 +90,6 @@ cors_origin = '*' # enable if you really need to serve assets in prd serve_static_assets = false + +# number of sidekiq workers (launched via unicorn master) +sidekiq_workers = 5 diff --git a/lib/demon/sidekiq.rb b/lib/demon/sidekiq.rb index b2d414ac0..09954d537 100644 --- a/lib/demon/sidekiq.rb +++ b/lib/demon/sidekiq.rb @@ -20,7 +20,7 @@ class Demon::Sidekiq < Demon::Base STDERR.puts "Loading Sidekiq in process id #{Process.pid}" require 'sidekiq/cli' cli = Sidekiq::CLI.instance - cli.parse([]) + cli.parse(["-c", GlobalSetting.sidekiq_workers.to_s]) load Rails.root + "config/initializers/sidekiq.rb" cli.run