http_server: exit signal to stop

This commit is contained in:
Izalia Mae 2021-10-08 18:02:15 -04:00
parent 293ed5e892
commit d4836c3249

View file

@ -1,4 +1,4 @@
import logging,multiprocessing, sanic, signal, traceback
import logging, multiprocessing, sanic, signal, sys, traceback
from functools import partial
@ -156,6 +156,7 @@ class Application(sanic.Sanic):
msg += f' with {self.cfg.workers} workers'
izzylog.info(msg)
super().run(
host = self.cfg.listen,
port = self.cfg.port,
@ -172,6 +173,7 @@ class Application(sanic.Sanic):
self.stop()
izzylog.info('Bye! :3')
sys.exit()
def parse_level(level):