Commit 453fc3e6 authored by Stan Hu's avatar Stan Hu

Defer loading of Sidekiq JSON formatter

This avoids the error messages caused by loading
`Sidekiq::JSONFormatter` twice:

warning: already initialized constant
Gitlab::SidekiqLogging::JSONFormatter::TIMESTAMP_FIELDS
parent 61e3e6c2
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
require 'optparse' require 'optparse'
require 'logger' require 'logger'
require 'time' require 'time'
require_relative '../../../../lib/gitlab/sidekiq_logging/json_formatter'
module Gitlab module Gitlab
module SidekiqCluster module SidekiqCluster
...@@ -16,6 +15,8 @@ module Gitlab ...@@ -16,6 +15,8 @@ module Gitlab
CommandError = Class.new(StandardError) CommandError = Class.new(StandardError)
def initialize(log_output = STDERR) def initialize(log_output = STDERR)
require_relative '../../../../lib/gitlab/sidekiq_logging/json_formatter'
# As recommended by https://github.com/mperham/sidekiq/wiki/Advanced-Options#concurrency # As recommended by https://github.com/mperham/sidekiq/wiki/Advanced-Options#concurrency
@max_concurrency = 50 @max_concurrency = 50
@min_concurrency = 0 @min_concurrency = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment