From af2f61653355b864bc28bc2205f05bdebc890348 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Tue, 31 Oct 2023 06:55:38 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20simplify=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/example.py | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/examples/example.py b/examples/example.py index 53a2fe45..e085c673 100644 --- a/examples/example.py +++ b/examples/example.py @@ -3,17 +3,9 @@ """ import asyncio -import sys - -import uvicorn -from fastapi import FastAPI -from loguru import logger from findmyorder import FindMyOrder -logger.remove() -logger.add(sys.stderr, level="INFO") - async def main(): """Main""" @@ -45,26 +37,5 @@ async def main(): await asyncio.sleep(7200) -app = FastAPI() - - -@app.on_event("startup") -async def start(): - """startup""" - asyncio.create_task(main()) - - -@app.get("/") -def read_root(): - """root""" - return {"FMO is online"} - - -@app.get("/health") -def health_check(): - """healthcheck""" - return {"FMO is online"} - - if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8080) + asyncio.run(main()) From 6907ec1fc38e9fa6ccb5ba289b8f1b3133e2ba81 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:23:11 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=F0=9F=9B=A0=EF=B8=8F(?= =?UTF-8?q?deps):=20update=20dependency=20pytest-asyncio=20to=20^0.22.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b815334b..b938a503 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ overgeneral-exceptions = [ [tool.poetry.group.test.dependencies] pytest = "^7.0" pytest-cov = "^4.1" -pytest-asyncio = "^0.21.0" +pytest-asyncio = "^0.22.0" pytest-mock = "^3.11.1" pytest-loguru = "^0.3.0" From 1bf9a3def5cf4d3213d20a93c506eceff7777130 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Sat, 4 Nov 2023 10:04:19 +0100 Subject: [PATCH 3/3] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b938a503..b815334b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ overgeneral-exceptions = [ [tool.poetry.group.test.dependencies] pytest = "^7.0" pytest-cov = "^4.1" -pytest-asyncio = "^0.22.0" +pytest-asyncio = "^0.21.0" pytest-mock = "^3.11.1" pytest-loguru = "^0.3.0"