debian-mirror-gitlab/config/initializers/health_check.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
627 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2016-06-02 11:05:42 +05:30
HealthCheck.setup do |config|
2017-08-17 22:00:37 +05:30
config.standard_checks = %w(database migrations cache)
config.full_checks = %w(database migrations cache)
2019-09-30 21:07:59 +05:30
Gitlab.ee do
config.add_custom_check('geo') do
Gitlab::Geo::HealthCheck.new.perform_checks
end
end
2016-06-02 11:05:42 +05:30
end
2019-12-26 22:10:19 +05:30
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