feat: Optimize parallelization even further

This commit is contained in:
Carlos Solís 2025-01-28 03:10:46 +00:00
parent 847a6337ad
commit bcaf777b20

View file

@ -50,9 +50,6 @@ then
sudo -u "${user}" bin/console movetoavatarcache | sudo tee "${tmpfile}" #&> /dev/null
fi
grep -e "https://${site}/${avatarfolder}/" "${tmpfile}" | sed -e "s/.*${site}/${folderescaped}/g" -e "s/?ts=.*//g" | (
while read -r n
do
find "${folder}/${avatarfolder}" -path "${n}" -type f | (
while read -r i
do
for p in "${i}" "${i//-320/-80}" "${i//-320/-48}"
@ -65,8 +62,6 @@ grep -e "https://${site}/${avatarfolder}/" "${tmpfile}" | sed -e "s/.*${site}/${
done
done
)
done
)
wait
rm "${tmpfile}"
/usr/bin/find "${folder}"/avatar -type d -empty -delete