mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:44:49 +08:00
BUGFIX: Sidekiq could be initialized incorrectly in some cases
Symptom, no jobs run
This commit is contained in:
parent
86c0d890d6
commit
95159fb82a
|
@ -19,6 +19,11 @@ class Demon::Sidekiq < Demon::Base
|
|||
def after_fork
|
||||
STDERR.puts "Loading Sidekiq in process id #{Process.pid}"
|
||||
require 'sidekiq/cli'
|
||||
# CLI will close the logger, if we have one set we can be in big
|
||||
# trouble, if STDOUT is closed in our process all sort of weird
|
||||
# will ensue, resetting the logger ensures it will reinit correctly
|
||||
# parent process is in charge of the file anyway.
|
||||
Sidekiq::Logging.logger = nil
|
||||
cli = Sidekiq::CLI.instance
|
||||
cli.parse(["-c", GlobalSetting.sidekiq_workers.to_s])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user