gitlab-org--gitlab-foss/config/initializers/8_gitaly.rb
Jacob Vosmaer 8eb350663e Deal with Rails autoload instance variable resets
Rails auto-load (a development feature) can end up resetting instance
variables on classes. This breaks Gitlab::GitalyClient, which uses
instance variables to keep global hashes to look up channels and
addresses. This change adds code that regenerates the hashes if they
suddenly become nil.
2017-04-05 14:43:08 +02:00

6 lines
206 B
Ruby

require 'uri'
# Make sure we initialize our Gitaly channels before Sidekiq starts multi-threaded execution.
if Gitlab.config.gitaly.enabled || Rails.env.test?
Gitlab::GitalyClient.configure_channels
end