فهرست منبع

Reopen child logs when we get a logreopen signal.

Chris McDonough 19 سال پیش
والد
کامیت
f4e3d30c6f
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 0 2
      TODO.txt
  2. 3 0
      src/supervisor/supervisord.py

+ 0 - 2
TODO.txt

@@ -40,8 +40,6 @@
 
 
 - stop logging all RPC requests in info mode when we ship
 - stop logging all RPC requests in info mode when we ship
 
 
-- reopen child logs when we get a logreopen signal
-
 - Collector issue 75:
 - Collector issue 75:
 
 
   If the pid file isn't writable, it dies silently. When I ran it with
   If the pid file isn't writable, it dies silently. When I ran it with

+ 3 - 0
src/supervisor/supervisord.py

@@ -709,6 +709,9 @@ class Supervisor:
             if hasattr(handler, 'reopen'):
             if hasattr(handler, 'reopen'):
                 handler.reopen()
                 handler.reopen()
 
 
+        for process in self.processes.values():
+            process.reopenlogs()
+
     def sigchild(self, sig, frame):
     def sigchild(self, sig, frame):
         # do nothing here, we reap our children synchronously
         # do nothing here, we reap our children synchronously
         self.options.logger.info('received sigchild')
         self.options.logger.info('received sigchild')