From b382a99283ae751c4664ea55a82278fd033b5026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Sol=C3=ADs?= Date: Thu, 6 Feb 2025 14:37:49 +0000 Subject: [PATCH] fix: Sort the processes by data complexity --- friendica-non-follower-featured-posts.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/friendica-non-follower-featured-posts.sh b/friendica-non-follower-featured-posts.sh index bf3f38d..4c3fd56 100755 --- a/friendica-non-follower-featured-posts.sh +++ b/friendica-non-follower-featured-posts.sh @@ -22,23 +22,23 @@ printf "\rContactDiscovery\t%s\n\r" "${cbmax}" cc=100 ccmax=0 while [[ ${cc} -gt 0 ]]; do - cc=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`)) and \`command\` = \"FetchFeaturedPosts\" limit ${cc}; select row_count();") + cc=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') in (select \`url\` from \`contact\` where \`id\` not in (select \`contact-id\` from \`group_member\`)) and \`command\` = \"UpdateGServer\" limit ${cd}; select row_count();") ccmax=$((ccmax + cc)) - printf "\rFetchFeaturedPosts\t%s\r" "${ccmax}" - + printf "\rUpdateGServer\t\t%s\r" "${ccmax}" done -printf "\rFetchFeaturedPosts\t%s\n\r" "${ccmax}" -#echo "FetchFeaturedPosts $ccmax" +printf "\rUpdateGServer\t\t%s\n\r" "${ccmax}" +#echo "UpdateGServer $ccmax" cd=100 cdmax=0 while [[ ${cd} -gt 0 ]]; do - cd=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`)) and \`command\` = \"UpdateGServer\" limit ${cd}; select row_count();") - cdmax=$((cdmax + cd)) - printf "\rUpdateGServer\t\t%s\r" "${cdmax}" + cd=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') in (select \`url\` from \`contact\` where \`id\` not in (select \`contact-id\` from \`group_member\`)) and \`command\` = \"FetchFeaturedPosts\" limit ${cc}; select row_count();") + cdmax=$((ccmax + cc)) + printf "\rFetchFeaturedPosts\t%s\r" "${cdmax}" + done -printf "\rUpdateGServer\t\t%s\n\r" "${cdmax}" -#echo "UpdateGServer $cdmax" +printf "\rFetchFeaturedPosts\t%s\n\r" "${cdmax}" +#echo "FetchFeaturedPosts $cdmax" ce=100 cemax=0