Sha256: c8a326b1a492934f6fa6e4b3ba794922e897140e03aa37b37bd9bcf63c71c7a0
Contents?: true
Size: 910 Bytes
Versions: 69
Compression:
Stored size: 910 Bytes
Contents
if defined?(Unicorn::WorkerKiller) Unicorn::WorkerKiller.module_eval do self.singleton_class.send(:alias_method, :kill_self_old, :kill_self) def self.kill_self(logger, start_time) self.kill_self_old(logger, start_time) if defined?(Prometheus) Prometheus::UNICORN_KILLS.set(1) else ZuoraConnect::AppInstance.write_to_telegraf(direction: 'Unicorn-Killer', tags: {app_instance: 0}, values: {kill: 1}) end end end end if defined?(Unicorn::HttpServer) && defined?(Prometheus) module HttpServerExtensions def kill_worker(signal, wpid) Prometheus::UNICORN_KILLS.increment super end end module WorkerExtensions def soft_kill(sig) Prometheus::UNICORN_KILLS.increment super end end class Unicorn::HttpServer prepend HttpServerExtensions end class Unicorn::Worker prepend WorkerExtensions end end
Version data entries
69 entries across 69 versions & 1 rubygems