FIX: Uninitialized class variable error in sidekiq (#17227)

Follow-up to 4199ada1ce
This commit is contained in:
Alan Guo Xiang Tan 2022-06-24 12:17:39 +08:00 committed by GitHub
parent 3f5e19c62a
commit 7d41e980c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ module Jobs
@@log_queue ||= Queue.new @@log_queue ||= Queue.new
if !@@log_thread || !@@log_thread.alive? if !defined?(@@log_thread) || !@@log_thread.alive?
@@log_thread = Thread.new do @@log_thread = Thread.new do
loop do loop do
@@logger << @@log_queue.pop @@logger << @@log_queue.pop