Merge pull request #652 from tiffanycmeyer13/unidata_20.3.2

More updates to checkFileTime.sh script to work correctly
This commit is contained in:
srcarter3 2024-01-17 10:05:58 -07:00 committed by GitHub
commit 89e0cc9f8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,8 @@
# #
# Updates # Updates
# Jan 12, 2024 - First stab at translating from our existing perl script # Jan 12, 2024 - First stab at translating from our existing perl script
# # Jan 16, 2024 - Update path to qpidNotify.py
# Jan 17, 2024 - Move file out of staging directory before calling qpidNotify.py
# #
# We want to concatenate grib and bufr files # We want to concatenate grib and bufr files
@ -16,16 +17,24 @@ paths=("/awips2/data_store/grid" "/awips2/data_store/modelsounding")
for path in "${paths[@]}"; for path in "${paths[@]}";
do do
# Check for relevant files that haven't been touched in the last two minutes # Check for relevant files that haven't been touched in the last two minutes
IFS=$'\n' IFS=$'\n'
files=($(find $path -name "*-concat-*" -mmin +2 | grep "staging")) files=($(find $path -name "*-concat-*" -mmin +2 | grep "staging"))
unset IFS unset IFS
# echo ${#files[@]} for file in "${files[@]}";
for file in "${files[@]}"; do
do # get the parent directory the staging dir is in
/awips2/python/bin/python /awips2/fxa/bin/src/qpidNotify/qpidNotify.py $file dir=$(dirname $file)
echo $file filename=$(basename $file)
done parentDir=$(dirname $dir)
# move file to parent dir
mv $file $parentDir
newFile=$parentDir/$filename
echo "Running /awips2/python/bin/python /awips2/fxa/bin/src/qpidNotify/qpidNotify.py $newFile"
/awips2/python/bin/python /awips2/fxa/bin/src/qpidNotify/qpidNotify.py $newFile
done
done done