Add signal handling to tfw_server.py

This commit is contained in:
Kristóf Tóth 2019-07-24 16:47:03 +02:00
parent f2b6123d41
commit 42f959878f

View File

@ -2,7 +2,7 @@ from sys import stderr
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tfw.main import TFWServer from tfw.main import TFWServer, setup_signal_handlers
from tfw.config import TFWENV from tfw.config import TFWENV
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
@ -13,4 +13,6 @@ if __name__ == '__main__':
Log(TFWENV.LOGFILE, VerboseLogFormatter()) Log(TFWENV.LOGFILE, VerboseLogFormatter())
]).start() ]).start()
TFWServer().listen() TFWServer().listen()
setup_signal_handlers()
IOLoop.instance().start() IOLoop.instance().start()