Class: Gitlab::Cluster::PumaWorkerKillerObserver

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/cluster/puma_worker_killer_observer.rb

Instance Method Summary collapse

Constructor Details

#initializePumaWorkerKillerObserver

Returns a new instance of PumaWorkerKillerObserver.


6
7
8
# File 'lib/gitlab/cluster/puma_worker_killer_observer.rb', line 6

def initialize
  @counter = Gitlab::Metrics.counter(:puma_killer_terminations_total, 'Number of workers terminated by PumaWorkerKiller')
end

Instance Method Details

#callbackObject

returns the Proc to be used as the observer callback block


11
12
13
# File 'lib/gitlab/cluster/puma_worker_killer_observer.rb', line 11

def callback
  method(:log_termination)
end