I have a python flask (using connexion) project that I need to reload if I change any of the files in the project.
This project is built into a python module using setup.py, then run.
I tried using extra_files parameter when running the project but this does not help. I could not tell if the extra_files cared about relative path, so I designed my code to provide full paths for all files. It still does not work.
I build the module with pip install -e ., then run it python -m thing.app.main
But the module does not pick up on changes. I thought using links (using the -e editable) parameter would help but it does not.
I should also mention that I am running all this in my pyenv, so the paths that are run during run time maybe different as they are in the pyenv path. Is that a problem?
Is this expected? Is there a way I can use extra_files? or will I need to use a watchdog daemon to monitor file changes?
I figured it out.
max_user_watchessetting in inotify. I changed it withecho 524288 | sudo tee /proc/sys/fs/inotify/max_user_watchesand now it works fine.