summaryrefslogtreecommitdiff
path: root/config/initializers/geo.rb
blob: b820f629d925fc12fabed7ab6e3230ab5e163a94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Gitlab.ee do
  if File.exist?(Rails.root.join('config/database_geo.yml'))
    Rails.application.configure do
      config.geo_database = config_for(:database_geo)
    end
  end

  begin
    if Gitlab::Geo.connected? && Gitlab::Geo.primary?
      Gitlab::Geo.current_node&.update_clone_url!
    end
  rescue => e
    warn "WARNING: Unable to check/update clone_url_prefix for Geo: #{e}"
  end
end