Runner: remove logging from signal handler.

It turns out that logging.Logger SHOULD NOT be used in signal handlers.
We are running into this elsewhere in the system so that is absolutely
no reason to risk it here.

ref: https://docs.python.org/3/library/logging.html#thread-safety
This commit is contained in:
Dave Shawley 2018-03-15 07:28:34 -04:00
parent 1868d40e63
commit 3321987dfc
2 changed files with 8 additions and 1 deletions

View file

@ -3,6 +3,14 @@
Release History
===============
`Next Release`_
---------------
- Remove logging from the signal handler. Logger's cannot safely be used
from within signal handlers. See `Thread Safety`_ in the logging module
documentation for details.
.. _Thread Safety: https://docs.python.org/3/library/logging.html#thread-safety
`1.5.0`_ (29 Jan 2018)
----------------------
- Enable port reuse for Tornado versions newer than 4.3.

View file

@ -139,7 +139,6 @@ class Runner(object):
iol.start()
def _on_signal(self, signo, frame):
self.logger.info('signal %s received, stopping', signo)
ioloop.IOLoop.instance().add_callback_from_signal(self._shutdown)
def _shutdown(self):