Open kyboi opened 2 months ago
That might be a good idea. Actually I'd want to implement it the way gunicorn did. Then actually check all files that are actually used by your python project and trigger reload only one of them has changed. Which might be a better fit.
Currently using
--reload
argument will take into account.gitignore
, but there are files that will trigger a reload even when it isn't necessary. These files must be in the repo so can't be added to the ignore, e.g. docker configuration files.Perhaps something like uvicorn does, with watchfiles:
https://github.com/encode/uvicorn/blob/master/uvicorn/supervisors/watchfilesreload.py