mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -02:30
Narrow down the inotifywait criteria for reloading the dev environment
- listen specifically within awx/awx, so that changes in awxkit or awx_collection don't trigger spurious reloads - expand the exclude pattern to ignore the test directories
This commit is contained in:
2
Makefile
2
Makefile
@@ -200,7 +200,7 @@ uwsgi: collectstatic
|
|||||||
--logformat "%(addr) %(method) %(uri) - %(proto) %(status)"
|
--logformat "%(addr) %(method) %(uri) - %(proto) %(status)"
|
||||||
|
|
||||||
awx-autoreload:
|
awx-autoreload:
|
||||||
@/awx_devel/tools/docker-compose/awx-autoreload /awx_devel "$(DEV_RELOAD_COMMAND)"
|
@/awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx "$(DEV_RELOAD_COMMAND)"
|
||||||
|
|
||||||
daphne:
|
daphne:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ fi
|
|||||||
|
|
||||||
last_reload=`date +%s`
|
last_reload=`date +%s`
|
||||||
|
|
||||||
inotifywait -mrq -e create,delete,attrib,close_write,move --exclude '/awx_devel/awx/ui' $1 | while read directory action file; do
|
inotifywait -mrq -e create,delete,attrib,close_write,move --exclude '(/awx_devel/awx/ui|/awx_devel/awx/.*/tests)' $1 | while read directory action file; do
|
||||||
this_reload=`date +%s`
|
this_reload=`date +%s`
|
||||||
since_last=$((this_reload-last_reload))
|
since_last=$((this_reload-last_reload))
|
||||||
if [[ "$file" =~ .*py$ ]] && [[ "$since_last" -gt 1 ]]; then
|
if [[ "$file" =~ .*py$ ]] && [[ "$since_last" -gt 1 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user