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 @@
require 'optparse'
require 'logger'
require 'time'
require_relative '../../../../lib/gitlab/sidekiq_logging/json_formatter'
module Gitlab
module SidekiqCluster
......@@ -16,6 +15,8 @@ module Gitlab
CommandError = Class.new(StandardError)
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
@max_concurrency = 50
@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