2021-02-03 21:09:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-10-16 15:06:17 +00:00
|
|
|
# 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
|
|
|
|
|
2019-12-22 09:07:51 +00:00
|
|
|
if Gitlab::Runtime.puma?
|
2019-10-16 15:06:17 +00:00
|
|
|
Puma::Cluster.prepend(::Gitlab::Cluster::Mixins::PumaCluster)
|
2019-12-22 09:07:51 +00:00
|
|
|
elsif Gitlab::Runtime.unicorn?
|
2019-10-16 15:06:17 +00:00
|
|
|
Unicorn::HttpServer.prepend(::Gitlab::Cluster::Mixins::UnicornHttpServer)
|
|
|
|
end
|