summaryrefslogtreecommitdiff
path: root/config/initializers/cluster_events_before_phased_restart.rb
blob: aae5470d6aeadae96b74591ad6a56b5674946eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# Technical debt, this should be ideally upstreamed.
#
# However, there's currently no way to hook before doing
# graceful shutdown today.
#
# Follow-up the issue: https://gitlab.com/gitlab-org/gitlab/issues/34107

if Gitlab::Runtime.puma?
  Puma::Cluster.prepend(::Gitlab::Cluster::Mixins::PumaCluster)
elsif Gitlab::Runtime.unicorn?
  Unicorn::HttpServer.prepend(::Gitlab::Cluster::Mixins::UnicornHttpServer)
end