mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FEATURE: set UNICORN_STATS_SOCKET_DIR for status socket
eg: sam@ubuntu stats_sockets % socat - UNIX-CONNECT:9622.sock gc_stat {"count":46,"heap_allocated_pages":2459,"heap_sorted_length":2460,"heap_allocatable_pages":0,"heap_available_slots":1002267,"heap_live_slots":647293,"heap_free_slots":354974,"heap_final_slots":0,"heap_marked_slots":503494,"heap_swept_slots":498773,"heap_eden_pages":2459,"heap_tomb_pages":0,"total_allocated_pages":2459,"total_freed_pages":0,"total_allocated_objects":4337014,"total_freed_objects":3689721,"malloc_increase_bytes":6448248,"malloc_increase_bytes_limit":29188387,"minor_gc_count":36,"major_gc_count":10,"remembered_wb_unprotected_objects":19958,"remembered_wb_unprotected_objects_limit":39842,"old_objects":462019,"old_objects_limit":895782,"oldmalloc_increase_bytes":6448696,"oldmalloc_increase_bytes_limit":19350882}
This commit is contained in:
@ -6,6 +6,10 @@ class Demon::Sidekiq < Demon::Base
|
||||
"sidekiq"
|
||||
end
|
||||
|
||||
def self.after_fork(&blk)
|
||||
blk ? (@blk=blk) : @blk
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def suppress_stdout
|
||||
@ -17,6 +21,8 @@ class Demon::Sidekiq < Demon::Base
|
||||
end
|
||||
|
||||
def after_fork
|
||||
Demon::Sidekiq.after_fork&.call
|
||||
|
||||
STDERR.puts "Loading Sidekiq in process id #{Process.pid}"
|
||||
require 'sidekiq/cli'
|
||||
# CLI will close the logger, if we have one set we can be in big
|
||||
|
Reference in New Issue
Block a user