From d438b97d39419270129ded891676e516ad69d422 Mon Sep 17 00:00:00 2001 From: "Dr.Caduceus" Date: Tue, 7 Nov 2023 14:34:12 +0530 Subject: [PATCH 1/5] Bump to v1.1 --- bot/server/__init__.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/bot/server/__init__.py b/bot/server/__init__.py index f60047a..9d52220 100644 --- a/bot/server/__init__.py +++ b/bot/server/__init__.py @@ -1,11 +1,12 @@ from quart import Quart -from uvicorn import Config, Server as UvicornServer +from hypercorn import Config +from hypercorn.asyncio import serve from logging import getLogger from bot.config import Server, LOGGER_CONFIG_JSON from . import main, error -logger = getLogger('uvicorn') +logger = getLogger('hypercorn') instance = Quart(__name__) @instance.before_serving @@ -20,11 +21,9 @@ instance.register_error_handler(404, error.not_found) instance.register_error_handler(405, error.invalid_method) instance.register_error_handler(error.HTTPError, error.http_error) -server = UvicornServer( - Config( - app = instance, - host = Server.BIND_ADDRESS, - port = Server.PORT, - log_config = LOGGER_CONFIG_JSON - ) -) \ No newline at end of file +async def run_server(): + config = Config() + config.bind = [f'{Server.BIND_ADDRESS}:{Server.PORT}'] + config.logconfig_dict = LOGGER_CONFIG_JSON + + await serve(instance, config) From 25e46b8e20634e8128ca622e659b2e9fdfc7b0ac Mon Sep 17 00:00:00 2001 From: "Dr.Caduceus" Date: Tue, 7 Nov 2023 14:38:30 +0530 Subject: [PATCH 2/5] Bump to v1.1 --- bot/server/templates/player.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot/server/templates/player.html b/bot/server/templates/player.html index 93bd1e3..f09d15d 100644 --- a/bot/server/templates/player.html +++ b/bot/server/templates/player.html @@ -1,4 +1,3 @@ - @@ -104,7 +103,7 @@