diff options
Diffstat (limited to 'metrics_server/settings_overrides.rb')
-rw-r--r-- | metrics_server/settings_overrides.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/metrics_server/settings_overrides.rb b/metrics_server/settings_overrides.rb new file mode 100644 index 00000000000..8572b4f86b0 --- /dev/null +++ b/metrics_server/settings_overrides.rb @@ -0,0 +1,14 @@ +# rubocop:disable Naming/FileName +# frozen_string_literal: true + +# Sidekiq-cluster code is loaded both inside a Rails/Rspec +# context as well as outside of it via CLI invocation. When it +# is loaded outside of a Rails/Rspec context we do not have access +# to all necessary constants. For example, we need Rails.root to +# determine the location of bin/metrics-server. +# Here we make the necessary constants available conditionally. +require_relative 'override_rails_constants' unless Object.const_defined?('Rails') + +require_relative '../config/settings' + +# rubocop:enable Naming/FileName |