Sha256: 4e355c1f83fba640c4ea1bc9a3d530662adf1d8b425a75f5ea171f5bd7c7170f
Contents?: true
Size: 582 Bytes
Versions: 24
Compression:
Stored size: 582 Bytes
Contents
module Prometheus module Client module Support module Unicorn def self.worker_pid_provider wid = worker_id if wid.nil? "process_id_#{Process.pid}" else "worker_id_#{wid}" end end def self.worker_id return unless defined?(::Unicorn::Worker) workers = ObjectSpace.each_object(::Unicorn::Worker) return if workers.nil? workers_first = workers.first workers_first.nr unless workers_first.nil? end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems