added changes to improve performance of sync
All checks were successful
Build (and tag) Images / build (push) Successful in 1m4s

This commit is contained in:
aso 2025-10-19 17:19:44 +02:00
commit c768645960
5 changed files with 101 additions and 7 deletions

View file

@ -50,21 +50,21 @@ curSeqNum=$lastSeqNum
curSeqNum=$(( $curSeqNum + 1 ))
while [ $curSeqNum -lt $newSeqNum ]
do
if [ -e "$curSeqNum.osc" ]
if [ -e "${curSeqNum}_filtered.osc" ]
then
rm "change_file.osc"
cp $curSeqNum.osc change_file.osc
cp ${curSeqNum}_filtered.osc change_file.osc
php create_camera_update_statements.php $curSeqNum
rm $curSeqNum.osc
rm ${curSeqNum}_filtered.osc
curSeqNum=$(( $curSeqNum + 1 ))
else
path=$(echo "$(printf "%09d" "$curSeqNum")" | sed -E "s#(...)(...)(...)#\1/\2/\3#")
url="${REPLICATE_URL}/${path}.osc.gz"
echo $url
curl -sL "$url" -o "$curSeqNum.osc.gz" && gunzip "$curSeqNum.osc.gz"
curl -sL "$url" -o "$curSeqNum.osc.gz" && gunzip "$curSeqNum.osc.gz" && python filter_osc.py ${curSeqNum} && rm ${curSeqNum}.osc
fi
done