mirror of
https://github.com/ansible/awx.git
synced 2026-02-14 17:50:02 -03:30
Merge pull request #12620 from jbradberry/even-narrower-reload
Restrict files that trigger a reload
This commit is contained in:
@@ -11,7 +11,7 @@ last_reload=`date +%s`
|
|||||||
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
|
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
|
||||||
echo "File changed: $file"
|
echo "File changed: $file"
|
||||||
echo "Running command: $2"
|
echo "Running command: $2"
|
||||||
eval $2
|
eval $2
|
||||||
|
|||||||
Reference in New Issue
Block a user