mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
BUGFIX: Sidekiq could be initialized incorrectly in some cases
Symptom, no jobs run
This commit is contained in:
@@ -19,6 +19,11 @@ class Demon::Sidekiq < Demon::Base
|
|||||||
def after_fork
|
def after_fork
|
||||||
STDERR.puts "Loading Sidekiq in process id #{Process.pid}"
|
STDERR.puts "Loading Sidekiq in process id #{Process.pid}"
|
||||||
require 'sidekiq/cli'
|
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 = Sidekiq::CLI.instance
|
||||||
cli.parse(["-c", GlobalSetting.sidekiq_workers.to_s])
|
cli.parse(["-c", GlobalSetting.sidekiq_workers.to_s])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user