From 0ab935e41275a20f0339001fc16b626ec75a3995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Sol=C3=ADs?= Date: Fri, 28 Feb 2025 08:50:25 -0600 Subject: [PATCH] fix: Reduce the amount of threads for background compression to delay system saturation --- friendica-fix-avatar-permissions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/friendica-fix-avatar-permissions.sh b/friendica-fix-avatar-permissions.sh index 4d976e6..d38b7e6 100755 --- a/friendica-fix-avatar-permissions.sh +++ b/friendica-fix-avatar-permissions.sh @@ -52,7 +52,7 @@ grep -e "https://${site}/${avatarfolder}/" "${tmpfile}" | sed -e "s/.*${site}/${ while read -r i; do for p in "${i}" "${i//-320/-80}" "${i//-320/-48}"; do loop_1 "${p}" & - if [[ $(jobs -r -p | wc -l) -ge $(getconf _NPROCESSORS_ONLN) ]]; then + if [[ $(jobs -r -p | wc -l) -ge $(( $(getconf _NPROCESSORS_ONLN) / 2) ]]; then wait -n fi done