Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/cluster/mixins/puma_cluster.rb')
-rw-r--r--lib/gitlab/cluster/mixins/puma_cluster.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/cluster/mixins/puma_cluster.rb b/lib/gitlab/cluster/mixins/puma_cluster.rb
index e9157d9f1e4..106c2731c07 100644
--- a/lib/gitlab/cluster/mixins/puma_cluster.rb
+++ b/lib/gitlab/cluster/mixins/puma_cluster.rb
@@ -8,8 +8,12 @@ module Gitlab
raise 'missing method Puma::Cluster#stop_workers' unless base.method_defined?(:stop_workers)
end
+ # This looks at internal status of `Puma::Cluster`
+ # https://github.com/puma/puma/blob/v3.12.1/lib/puma/cluster.rb#L333
def stop_workers
- Gitlab::Cluster::LifecycleEvents.do_before_phased_restart
+ if @status == :stop # rubocop:disable Gitlab/ModuleWithInstanceVariables
+ Gitlab::Cluster::LifecycleEvents.do_before_graceful_shutdown
+ end
super
end