Merge pull request #12368 from jbradberry/narrower-autoreload

Narrow down the inotifywait criteria for reloading the dev environment
This commit is contained in:
Jeff Bradberry 2022-06-14 10:13:41 -04:00 committed by GitHub
commit 3bc0c53e37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ uwsgi: collectstatic
--logformat "%(addr) %(method) %(uri) - %(proto) %(status)"
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:
@if [ "$(VENV_BASE)" ]; then \

View File

@ -8,7 +8,7 @@ fi
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`
since_last=$((this_reload-last_reload))
if [[ "$file" =~ .*py$ ]] && [[ "$since_last" -gt 1 ]]; then