mirror of
https://github.com/sprockets/sprockets.http.git
synced 2024-11-14 11:19:26 +00:00
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:
parent
1868d40e63
commit
3321987dfc
2 changed files with 8 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue