bugfix
This commit is contained in:
parent
354c5b9db6
commit
52a6b1911d
@ -24,12 +24,13 @@ from .real_ip import real_ip_middleware
|
|||||||
|
|
||||||
startup_coros = []
|
startup_coros = []
|
||||||
cleanup_coros = []
|
cleanup_coros = []
|
||||||
|
cleanupctx_coros = []
|
||||||
|
|
||||||
def add_startup(coro):
|
def add_startup(coro):
|
||||||
startup_coros.append(coro)
|
startup_coros.append(coro)
|
||||||
|
|
||||||
def add_cleanup(coro):
|
def add_cleanupctx(coro):
|
||||||
cleanup_coros.append(coro)
|
cleanupctx_coros.append(coro)
|
||||||
|
|
||||||
class AHApp(web.Application):
|
class AHApp(web.Application):
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
@ -116,7 +117,7 @@ class ConfiguredServer:
|
|||||||
reuse_port = True
|
reuse_port = True
|
||||||
print('reuse_port=', reuse_port)
|
print('reuse_port=', reuse_port)
|
||||||
[ self.app.on_startup.append(c) for c in startup_coros ]
|
[ self.app.on_startup.append(c) for c in startup_coros ]
|
||||||
[ self.app.on_cleanup.append(c) for c in cleanup_coros ]
|
[ self.app.cleanup_ctx.append(c) for c in cleanupctx_coros ]
|
||||||
web.run_app(self.build_app(),host=config.website.host or '0.0.0.0',
|
web.run_app(self.build_app(),host=config.website.host or '0.0.0.0',
|
||||||
port=port,
|
port=port,
|
||||||
reuse_port=reuse_port,
|
reuse_port=reuse_port,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user