diff --git a/htagweb/appserver.py b/htagweb/appserver.py index 0ae7495..da381a7 100644 --- a/htagweb/appserver.py +++ b/htagweb/appserver.py @@ -34,7 +34,7 @@ from . import crypto import redys.v2 -from htagweb.server import hrserver, wait_hrserver +from htagweb.server import hrserver, hrserver_orchestrator, wait_hrserver from htagweb.server.client import HrClient logger = logging.getLogger(__name__) @@ -184,18 +184,19 @@ async def on_disconnect(self, websocket, close_code): def processHrServer(): - asyncio.run( hrserver() ) + asyncio.run( redys.v2.loop(hrserver_orchestrator()) ) async def lifespan(app): process_hrserver=multiprocessing.Process(target=processHrServer) process_hrserver.start() - await wait_hrserver() + + # await wait_hrserver() yield - process_hrserver.kill() + # process_hrserver.kill() class AppServer(Starlette): diff --git a/poetry.lock b/poetry.lock index 26f3619..448dd8e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -308,13 +308,13 @@ files = [ [[package]] name = "packaging" -version = "23.1" +version = "23.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, - {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] [[package]] @@ -772,4 +772,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "3385349b67e2b796830a4765c38ee429dee72cc9ce3d474fd658d8a2a30ebda9" +content-hash = "0b67ef8004abeddd715ef88effdb2e718ddebeb964580d099fcf3981b6a79fb4" diff --git a/pyproject.toml b/pyproject.toml index fff5bcc..7fd29c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ htag = "^0.42" starlette = "0.29.0" pycryptodomex = "^3.19.0" uvicorn = {version = "0.22.0", extras = ["standard"]} -redys = "0.9.9" +redys = "^0.9" [tool.poetry.group.dev.dependencies]