-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Reload workers on code change (or improve documentation) #3846
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
@cdvv7788 The Slack notification backend does not delegate to task workers, so the reload of uwsgi should be sufficient. I am completely puzzled why the reloader would see your changes and reload, but you still have to restart your container to have those changes take effect. Edit: though it may be that notifications are getting issued from within a task, so it might still be that the task worker reloader is not working correctly. |
@jbradberry I am running the test notification on the notification screen (the one with the bell icon). |
Ok, you are probably correct. I'll dig into it a bit more tomorrow. |
@cdvv7788 As a faster way of dealing with this before the fix gets in, try starting a shell session in your container and then running |
@jbradberry I am seeing the following: |
I think this just plain doesn’t work because the parent dispatcher process forks its children. To really accomplish this we’d need to have some way to restart the entire dispatcher process tree. I don't think honcho has a way to restart processes it's managing though. |
@ryanpetrello got it. Thanks a lot for your quick response. |
* Instance Groups Instances slider renders properly, and that list wraps properly. * Instance Groups responds properly * assorted container groups ui fixes updated responsiveness of instance groups and instances list fix layout of container group form update help text for container group form elements update text for tech preview top bar * update container group doclink * list styling updates based on feedback
* Instance Groups Instances slider renders properly, and that list wraps properly. * Instance Groups responds properly * assorted container groups ui fixes updated responsiveness of instance groups and instances list fix layout of container group form update help text for container group form elements update text for tech preview top bar * update container group doclink * list styling updates based on feedback
* Instance Groups Instances slider renders properly, and that list wraps properly. * Instance Groups responds properly * assorted container groups ui fixes updated responsiveness of instance groups and instances list fix layout of container group form update help text for container group form elements update text for tech preview top bar * update container group doclink * list styling updates based on feedback
ISSUE TYPE
COMPONENT NAME
SUMMARY
I followed all the steps at https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md and was able to set up the project locally. That much works.
However, when I started to modify python code, to see the changes I have to restart the whole process (tools_awx_1). I went to the irc (which is not very active) and couldn't find a way to enable the development server. Refreshing changes manually is very slow, and I don't think that every contributor does it that way.
I would like to have a little more information in the document about how to work and contribute to the project, because as it is, I would spend most of my time refreshing a server instead of making progress.
I noticed that there is something that should be reloading the code on changes (see additional information).
Maybe the code I am modifying is not running on uwsgi? (not familiar with the architecture yet, sorry). If the code needs to be refreshed on some async task runner (celery, maybe?), that is not happening.
Just fyi, I am trying to change notifications a little: awx/notifications/slack_backend.py
ENVIRONMENT
STEPS TO REPRODUCE
Follow steps at https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md to setup server. Then change awx/notifications/slack_backend.py (with the dev server running)
EXPECTED RESULTS
The servers are reloaded, and the new code changes are reflected in the site.
ACTUAL RESULTS
It seems that uwsgi is reloaded, but code changes are still not reflected.
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: