mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Run multiple threads for regular job schedules
Under extreme load on large databases certain regular jobs can take quite a while to run. We need to ensure we never starve a sidekiq from running mini scheduler, cause without it we are unable to queue stuff such as heartbeat jobs.
This commit is contained in:
@@ -62,7 +62,7 @@ if Sidekiq.server?
|
||||
scheduler_hostname = ENV["UNICORN_SCHEDULER_HOSTNAME"]
|
||||
|
||||
if !scheduler_hostname || scheduler_hostname.split(',').include?(`hostname`.strip)
|
||||
MiniScheduler.start
|
||||
MiniScheduler.start(workers: GlobalSetting.mini_scheduler_workers)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user