-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Local development: celery/build container don't restart on files changes #8802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is due to a bug in watchdog library. A quick fix would be to remove the Traceback from watchmedo
|
@alella thanks a lot for sharing this! I opened a PR at readthedocs/common#106 to fix this issue. I tested it locally and it worked fine. |
I'm hitting these issues now, and I'm not sure how to exclude
We could replace watchmedo by watchman, but that will require some extra effort: https://facebook.github.io/watchman/docs/watchman-make.html |
We have been dealing with a problem with `watchmedo` that restart the process when it shouldn't be restarted and it doesn't restart it when it should. I got tired debugging `watchmedo` and I was suggested to give it a try to `nodemon` because we are already using it in other projects. I'm not super happy adding a node dependency to the Dockerfile, but I didn't find a better way to do it. I did some tests with the configuration proposed and it seemed to work pretty well. I'm sure we will find some edge cases, but we always can tune it a little more later. Closes #8802
#9338) * Local development: use `nodemon` to watch files instead of `watchmedo` We have been dealing with a problem with `watchmedo` that restart the process when it shouldn't be restarted and it doesn't restart it when it should. I got tired debugging `watchmedo` and I was suggested to give it a try to `nodemon` because we are already using it in other projects. I'm not super happy adding a node dependency to the Dockerfile, but I didn't find a better way to do it. I did some tests with the configuration proposed and it seemed to work pretty well. I'm sure we will find some edge cases, but we always can tune it a little more later. Closes #8802 * Local development: remove `watchdo` Python package It's not required anymore since we are using `nodemon` now.
We are using
watchmedo
to listen to file changes and restartcelery
andbuild
containers. However, this has stopped working for some reason. If you change any Python file you will notice that these containers are not restarted and you have to manually executeinv docker.restart "celery build"
to load the changes, which takes more time to restart than withwatchmedo
.The
watchmedo
command executed is at https://github.com/readthedocs/common/blob/4d31f030bde728e2a86ccafbaceadca17122ae15/dockerfiles/entrypoints/build.sh#L12-L20 and https://github.com/readthedocs/common/blob/4d31f030bde728e2a86ccafbaceadca17122ae15/dockerfiles/entrypoints/celery.sh#L14-L23The text was updated successfully, but these errors were encountered: