Commit d1b6179f authored by Gabriel Mazetto's avatar Gabriel Mazetto

Prevent loading state_machine in factories when geo is disabled

parent 8f01dd9a
...@@ -13,6 +13,12 @@ module Geo ...@@ -13,6 +13,12 @@ module Geo
establish_connection Rails.configuration.geo_database establish_connection Rails.configuration.geo_database
end end
def self.connected?
super if ::Gitlab::Geo.geo_database_configured?
false
end
def self.connection def self.connection
unless ::Gitlab::Geo.geo_database_configured? unless ::Gitlab::Geo.geo_database_configured?
message = NOT_CONFIGURED_MSG message = NOT_CONFIGURED_MSG
......
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