diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-04 09:06:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-04 09:06:05 +0300 |
commit | 535d167d40638105527bc6c9a86f33d2ffd62743 (patch) | |
tree | 27c73f33497378f6bb84840223ce7d3fda42cc0a /lib/gitlab/cluster | |
parent | bee11af56deccfd13243cf5f31d42bd992404066 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/cluster')
-rw-r--r-- | lib/gitlab/cluster/lifecycle_events.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/cluster/lifecycle_events.rb b/lib/gitlab/cluster/lifecycle_events.rb index 8f796748199..3fbbccbf56e 100644 --- a/lib/gitlab/cluster/lifecycle_events.rb +++ b/lib/gitlab/cluster/lifecycle_events.rb @@ -40,7 +40,7 @@ module Gitlab (@before_fork_hooks ||= []) << block end - def on_master_restart(&block) + def on_before_master_restart(&block) return unless in_clustered_environment? # Defer block execution @@ -70,12 +70,15 @@ module Gitlab end end - def do_master_restart + def do_before_master_restart @master_restart_hooks && @master_restart_hooks.each do |block| block.call end end + # DEPRECATED + alias_method :do_master_restart, :do_before_master_restart + # Puma doesn't use singletons (which is good) but # this means we need to pass through whether the # puma server is running in single mode or cluster mode |