http_server: exit signal to stop
This commit is contained in:
parent
293ed5e892
commit
d4836c3249
|
@ -1,4 +1,4 @@
|
||||||
import logging,multiprocessing, sanic, signal, traceback
|
import logging, multiprocessing, sanic, signal, sys, traceback
|
||||||
|
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
@ -156,6 +156,7 @@ class Application(sanic.Sanic):
|
||||||
msg += f' with {self.cfg.workers} workers'
|
msg += f' with {self.cfg.workers} workers'
|
||||||
|
|
||||||
izzylog.info(msg)
|
izzylog.info(msg)
|
||||||
|
|
||||||
super().run(
|
super().run(
|
||||||
host = self.cfg.listen,
|
host = self.cfg.listen,
|
||||||
port = self.cfg.port,
|
port = self.cfg.port,
|
||||||
|
@ -172,6 +173,7 @@ class Application(sanic.Sanic):
|
||||||
|
|
||||||
self.stop()
|
self.stop()
|
||||||
izzylog.info('Bye! :3')
|
izzylog.info('Bye! :3')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
def parse_level(level):
|
def parse_level(level):
|
||||||
|
|
Loading…
Reference in a new issue