Skip to content

[BUG] @repeat_every will have no stack trace in terminal #68

Description

@shizidushu

Describe the bug
No error will show

To Reproduce

from fastapi import FastAPI
from fastapi_utils.tasks import repeat_every
app = FastAPI()
items = {}
@app.on_event("startup")
@repeat_every(seconds=60)
async def startup_event():
raise Exception
items["foo"] = {"name": "Fighters"}
items["bar"] = {"name": "Tenders"}
@app.get("/items/{item_id}")
async def read_items(item_id: str):
return items[item_id]

uvicorn app.main:app --reload, the raise Exception should produce a stack trace in terminal, but none.

Environment:

  • Windows
Python3.7.7 (tags/v3.7.7:d7c567b08f, Mar102020, 10:41:24) [MSCv.190064bit (AMD64)] onwin32Type"help", "copyright", "credits"or"license"formoreinformation.
>>>importfastapi_utils>>>importfastapi>>>importpydantic.utils>>>print(fastapi_utils.__version__)
0.2.1>>>print(fastapi.__version__)
0.58.0>>>print(pydantic.utils.version_info())
pydanticversion: 1.5.1pydanticcompiled: Trueinstallpath: D:\git\testFastapiutils\venv\Lib\site-packages\pydanticpythonversion: 3.7.7 (tags/v3.7.7:d7c567b08f, Mar102020, 10:41:24) [MSCv.190064bit (AMD64)]
platform: Windows-10-10.0.18362-SP0optionaldeps. installed: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions