2021-02-03 21:09:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-05 19:25:02 +00:00
|
|
|
HealthCheck.setup do |config|
|
2017-02-22 17:46:57 +00:00
|
|
|
config.standard_checks = %w(database migrations cache)
|
|
|
|
config.full_checks = %w(database migrations cache)
|
2019-07-08 19:47:16 +00:00
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
config.add_custom_check('geo') do
|
|
|
|
Gitlab::Geo::HealthCheck.new.perform_checks
|
|
|
|
end
|
|
|
|
end
|
2016-05-05 19:25:02 +00:00
|
|
|
end
|
2019-11-07 15:06:33 +00:00
|
|
|
|
|
|
|
Gitlab::Cluster::LifecycleEvents.on_before_fork do
|
|
|
|
Gitlab::HealthChecks::MasterCheck.register_master
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab::Cluster::LifecycleEvents.on_before_blackout_period do
|
|
|
|
Gitlab::HealthChecks::MasterCheck.finish_master
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab::Cluster::LifecycleEvents.on_worker_start do
|
|
|
|
Gitlab::HealthChecks::MasterCheck.register_worker
|
|
|
|
end
|