From 37748e44f7d1eec0b280d1f6aa15b2282a12dec4 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 30 Jul 2018 08:10:49 -0700 Subject: [PATCH] Move rbtrace initialization into Sidekiq --- config/initializers/rbtrace.rb | 5 ----- config/initializers/sidekiq.rb | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 config/initializers/rbtrace.rb diff --git a/config/initializers/rbtrace.rb b/config/initializers/rbtrace.rb deleted file mode 100644 index c96e6985cda..00000000000 --- a/config/initializers/rbtrace.rb +++ /dev/null @@ -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? diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index f6803eb0b5a..6f54bee4713 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -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|