Module: Gitlab::Cluster::Mixins::PumaCluster

Defined in:
lib/gitlab/cluster/mixins/puma_cluster.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



7
8
9
# File 'lib/gitlab/cluster/mixins/puma_cluster.rb', line 7

def self.prepended(base)
  raise 'missing method Puma::Cluster#stop_workers' unless base.method_defined?(:stop_workers)
end

Instance Method Details

#stop_workersObject

This looks at internal status of ‘Puma::Cluster` github.com/puma/puma/blob/v3.12.1/lib/puma/cluster.rb#L333



13
14
15
16
17
18
19
# File 'lib/gitlab/cluster/mixins/puma_cluster.rb', line 13

def stop_workers
  if @status == :stop # rubocop:disable Gitlab/ModuleWithInstanceVariables
    Gitlab::Cluster::LifecycleEvents.do_before_graceful_shutdown
  end

  super
end