Commit 09ad5832 authored by nmilojevic1's avatar nmilojevic1

Use GitLab::Database.exists? instead

parent ffd4d50c
...@@ -14,9 +14,7 @@ end ...@@ -14,9 +14,7 @@ end
if defined?(ActiveRecord::Base) && Gitlab::Runtime.web_server? if defined?(ActiveRecord::Base) && Gitlab::Runtime.web_server?
Gitlab::Cluster::LifecycleEvents.on_before_fork do Gitlab::Cluster::LifecycleEvents.on_before_fork do
ActiveSupport.on_load(:active_record) do raise 'ActiveRecord connection not established. Unable to start.' unless GitLab::Database.exists?
raise 'ActiveRecord connection not established. Unable to start.' unless ::ActiveRecord::Base.connected?
end
end end
end 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