No shutdown event (lifespan cleanup) when using --reload #1905
-
It seems my lifespan cleanup actions are not triggered when I§ use uvicorn with Rough idea: @asynccontextmanager
async def lifespan(app: Starlette) -> AsyncGenerator[State, None]:
print("START")
yield None
print("SHUTDOWN")
app = FastAPI(lifespan=lifespan) Without |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Mar 16, 2023
Replies: 1 comment 2 replies
-
Are you on windows? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you on windows?