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:
Jeff Bradberry
2022-06-13 16:08:20 -04:00
parent 705f86f8cf
commit e8b2998578
2 changed files with 2 additions and 2 deletions

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