From 4d5755409d66176728edeba4723719307fe07f51 Mon Sep 17 00:00:00 2001 From: timotheyca Date: Sun, 28 Nov 2021 00:22:56 +0300 Subject: [PATCH] run_app --- v6d1tokens/run-server.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/v6d1tokens/run-server.py b/v6d1tokens/run-server.py index 58f850c..47da594 100644 --- a/v6d1tokens/run-server.py +++ b/v6d1tokens/run-server.py @@ -1,7 +1,6 @@ import asyncio -from aiohttp import web -from v6d0auth.config import port, host +from v6d0auth.run_app import run_app from v6d1tokens.app import get_app from v6d1tokens.tdb import TDB @@ -11,17 +10,7 @@ async def main(): tdb = TDB() app = get_app(tdb) async with tdb.db: - runner = web.AppRunner(app) - await runner.setup() - site = web.TCPSite(runner, host=host, port=port) - await site.start() - names = sorted(str(s.name) for s in runner.sites) - print( - "======== Running on {} ========\n" - "(Press CTRL+C to quit)".format(", ".join(names)) - ) - while True: - await asyncio.sleep(3600) + await run_app(app) if __name__ == '__main__':