You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That behavior, while from the test cases seems to be intended to roll up things like .graphql files, also unfortunately rolls up .pyc files, meaning every restart is a double restart:
WARNING: Detected file change in 'app/main.py'. Reloading...
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [87024]
INFO: Started server process [87080]
INFO: Waiting for application startup.
INFO: Application startup complete.
WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading...
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [87080]
INFO: Started server process [87093]
INFO: Waiting for application startup.
INFO: Application startup complete.
It might be better to use Path.glob so users can specify file extensions and paths more explicitly than with os.walk, but it's published already so maybe as another flag?
A minor point, but worth noting in the docs: --reload_dir on the CLI becomes reload_dirs=['my_dir'] in code: uvicorn.run('app.main:app', host="0.0.0.0", port=8000, reload=True, reload_dirs=['app'])
Thanks for making this great library!
The text was updated successfully, but these errors were encountered:
Hey! I upgraded to 0.11.4 shortly after release today, and it has a couple of quirks.
.graphql
files, also unfortunately rolls up.pyc
files, meaning every restart is a double restart:It might be better to use Path.glob so users can specify file extensions and paths more explicitly than with
os.walk
, but it's published already so maybe as another flag?--reload_dir
on the CLI becomesreload_dirs=['my_dir']
in code:uvicorn.run('app.main:app', host="0.0.0.0", port=8000, reload=True, reload_dirs=['app'])
Thanks for making this great library!
The text was updated successfully, but these errors were encountered: