-
Couldn't load subscription status.
- Fork 179
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
On version 0.2.1 there is no problem, but when using 0.6.0 the app doesn't start. Attaching simple code to reproduce
To Reproduce
import logging
from contextlib import asynccontextmanager
import uvicorn
from fastapi import FastAPI
from fastapi_utils.tasks import repeat_every
logging.basicConfig(level=logging.INFO, force=True)
logger = logging.getLogger(__name__)
@asynccontextmanager
async def lifespan(app: FastAPI):
await do_something()
yield
app = FastAPI(lifespan=lifespan)
@repeat_every(seconds=1, logger=logger) # 30 Minutes
async def do_something() -> None:
logger.info("Removing idle devcontainers...")
return
@app.get("/")
async def health():
return 'Success'
if __name__ == "__main__":
uvicorn.run(app, host="localhost", port=8080)Expected behavior
App should start
Environment:
- OS: Tested on Linux and Windows
- FastAPI Utils version 0.6.0
- Python version 3.11
dwdSF, leozqin, PoorRican, RZetko, mehmetozzen and 12 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working