Skip to content

Commit

Permalink
Merge pull request #341 from mraniki/dev
Browse files Browse the repository at this point in the history
⬆️ 🤖 - You are dishonest but never to the point of hurting a friend
  • Loading branch information
github-actions[bot] committed Nov 5, 2023
2 parents 007f525 + 1bf9a3d commit dd191ef
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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())

0 comments on commit dd191ef

Please sign in to comment.