Commit 6910064f authored by Stan Hu's avatar Stan Hu

Merge branch 'sh-geo-avoid-db-initializer' into 'master'

Avoid using the database in the Geo initializer

See merge request !2099
parents da35c469 2d6af8b9
......@@ -6,9 +6,10 @@ if File.exist?(Rails.root.join('config/database_geo.yml')) &&
end
begin
if Gitlab::Geo.primary?
# Avoid using the database if this is run in a Rake task
if Gitlab::Geo.primary_role_enabled?
Gitlab::Geo.current_node.update_clone_url!
end
rescue
warn 'WARNING: Unable to check/update clone_url_prefix for Geo'
rescue => e
warn "WARNING: Unable to check/update clone_url_prefix for Geo: #{e}"
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment