Commit d0fb0a2a authored by nmilojevic1's avatar nmilojevic1

Fail fast without ActiveRecord connection

parent 5f7da728
......@@ -6,6 +6,7 @@ module Gitlab
module PumaCluster
def self.prepended(base)
raise 'missing method Puma::Cluster#stop_workers' unless base.method_defined?(:stop_workers)
raise 'ActiveRecord connection not established. Unable to start.' unless ActiveRecord::Base.connected?
end
# This looks at internal status of `Puma::Cluster`
......
......@@ -8,6 +8,8 @@ module Gitlab
unless base.method_defined?(:reexec) && base.method_defined?(:stop)
raise 'missing method Unicorn::HttpServer#reexec or Unicorn::HttpServer#stop'
end
raise 'ActiveRecord connection not established. Unable to start.' unless ::ActiveRecord::Base.connected?
end
def reexec
......
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