diff options
Diffstat (limited to 'lib/gitlab/health_checks/master_check.rb')
-rw-r--r-- | lib/gitlab/health_checks/master_check.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/health_checks/master_check.rb b/lib/gitlab/health_checks/master_check.rb index 057bce84ddd..b2c3695e6d9 100644 --- a/lib/gitlab/health_checks/master_check.rb +++ b/lib/gitlab/health_checks/master_check.rb @@ -8,7 +8,16 @@ module Gitlab extend SimpleAbstractCheck class << self + extend ::Gitlab::Utils::Override + + override :available? + def available? + Gitlab::Runtime.puma_in_clustered_mode? + end + def register_master + return unless available? + # when we fork, we pass the read pipe to child # child can then react on whether the other end # of pipe is still available @@ -16,11 +25,15 @@ module Gitlab end def finish_master + return unless available? + close_read close_write end def register_worker + return unless available? + # fork needs to close the pipe close_write end |