Move rbtrace initialization into Sidekiq

This commit is contained in:
Stan Hu 2018-07-30 08:10:49 -07:00
parent 820923664d
commit 37748e44f7
2 changed files with 2 additions and 5 deletions

View File

@ -1,5 +0,0 @@
# frozen_string_literal: true
# rbtrace needs to be included after the unicorn worker forks.
# See the after_fork block in config/unicorn.rb.example.
require 'rbtrace' if ENV['ENABLE_RBTRACE'] && Sidekiq.server?

View File

@ -8,6 +8,8 @@ Sidekiq.default_worker_options = { retry: 3 }
enable_json_logs = Gitlab.config.sidekiq.log_format == 'json'
Sidekiq.configure_server do |config|
require 'rbtrace' if ENV['ENABLE_RBTRACE']
config.redis = queues_config_hash
config.server_middleware do |chain|